mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 11:31:53 +01:00
trunk/branch integration: using Poco::Ascii
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// SimpleFileChannel.cpp
|
// SimpleFileChannel.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/svn/Foundation/src/SimpleFileChannel.cpp#2 $
|
// $Id: //poco/1.4/Foundation/src/SimpleFileChannel.cpp#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Logging
|
// Package: Logging
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
#include "Poco/File.h"
|
#include "Poco/File.h"
|
||||||
#include "Poco/Message.h"
|
#include "Poco/Message.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include <cctype>
|
#include "Poco/Ascii.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -182,11 +182,11 @@ void SimpleFileChannel::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();
|
||||||
UInt64 n = 0;
|
UInt64 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++;
|
||||||
|
|
||||||
if (unit == "K")
|
if (unit == "K")
|
||||||
_limit = n*1024;
|
_limit = n*1024;
|
||||||
|
|||||||
Reference in New Issue
Block a user