diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Glacier/ClientBlobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/Glacier/ClientBlobject.cpp b/cpp/src/Glacier/ClientBlobject.cpp index 7eca7e65bbd..e0562ec718d 100644 --- a/cpp/src/Glacier/ClientBlobject.cpp +++ b/cpp/src/Glacier/ClientBlobject.cpp @@ -27,16 +27,16 @@ Glacier::ClientBlobject::ClientBlobject(const CommunicatorPtr& communicator, PropertiesPtr properties = _communicator->getProperties(); _traceLevel = properties->getPropertyAsInt("Glacier.Router.Trace.Client"); - size_t current = 0; const string ws = " \t"; - do + size_t current = allowCategories.find_first_not_of(ws, 0); + while (current != string::npos) { size_t pos = allowCategories.find_first_of(ws, current); size_t len = (pos == string::npos) ? string::npos : pos - current; - _allowCategories.insert(allowCategories.substr(current, len)); + string category = allowCategories.substr(current, len); + _allowCategories.insert(category); current = allowCategories.find_first_not_of(ws, pos); } - while (current != string::npos); } Glacier::ClientBlobject::~ClientBlobject() |