mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 12:18:01 +01:00
trunk/branch integration: using Poco::Ascii & memoryleak fix
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
#include "Poco/String.h"
|
#include "Poco/String.h"
|
||||||
#include "Poco/Timespan.h"
|
#include "Poco/Timespan.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include <cctype>
|
#include "Poco/Ascii.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -220,11 +220,11 @@ void FileChannel::setRotation(const std::string& rotation)
|
|||||||
std::string::const_iterator it = rotation.begin();
|
std::string::const_iterator it = rotation.begin();
|
||||||
std::string::const_iterator end = rotation.end();
|
std::string::const_iterator end = rotation.end();
|
||||||
int n = 0;
|
int n = 0;
|
||||||
while (it != end && std::isspace(*it)) ++it;
|
while (it != end && Ascii::isSpace(*it)) ++it;
|
||||||
while (it != end && std::isdigit(*it)) { n *= 10; n += *it++ - '0'; }
|
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
|
||||||
while (it != end && std::isspace(*it)) ++it;
|
while (it != end && Ascii::isSpace(*it)) ++it;
|
||||||
std::string unit;
|
std::string unit;
|
||||||
while (it != end && std::isalpha(*it)) unit += *it++;
|
while (it != end && Ascii::isAlpha(*it)) unit += *it++;
|
||||||
|
|
||||||
RotateStrategy* pStrategy = 0;
|
RotateStrategy* pStrategy = 0;
|
||||||
if ((rotation.find(',') != std::string::npos) || (rotation.find(':') != std::string::npos))
|
if ((rotation.find(',') != std::string::npos) || (rotation.find(':') != std::string::npos))
|
||||||
@@ -311,11 +311,11 @@ void FileChannel::setPurgeAge(const std::string& age)
|
|||||||
std::string::const_iterator end = age.end();
|
std::string::const_iterator end = age.end();
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
while (it != end && std::isspace(*it)) ++it;
|
while (it != end && Ascii::isSpace(*it)) ++it;
|
||||||
while (it != end && std::isdigit(*it)) { n *= 10; n += *it++ - '0'; }
|
while (it != end && Ascii::isDigit(*it)) { n *= 10; n += *it++ - '0'; }
|
||||||
while (it != end && std::isspace(*it)) ++it;
|
while (it != end && Ascii::isSpace(*it)) ++it;
|
||||||
std::string unit;
|
std::string unit;
|
||||||
while (it != end && std::isalpha(*it)) unit += *it++;
|
while (it != end && Ascii::isAlpha(*it)) unit += *it++;
|
||||||
|
|
||||||
Timespan::TimeDiff factor = Timespan::SECONDS;
|
Timespan::TimeDiff factor = Timespan::SECONDS;
|
||||||
if (unit == "minutes")
|
if (unit == "minutes")
|
||||||
|
|||||||
Reference in New Issue
Block a user