diff options
author | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
commit | c5959fd09de61604bedd75354401df6a57395d65 (patch) | |
tree | 3b0227f631c8b20fb1a1a274b92f63f52f34af2c /cpp/src/Ice/Initialize.cpp | |
parent | Small fix (diff) | |
parent | Enable -Wconversion with clang - Close #363 (diff) | |
download | ice-c5959fd09de61604bedd75354401df6a57395d65.tar.bz2 ice-c5959fd09de61604bedd75354401df6a57395d65.tar.xz ice-c5959fd09de61604bedd75354401df6a57395d65.zip |
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/src/Ice/Initialize.cpp')
-rw-r--r-- | cpp/src/Ice/Initialize.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 70f48b781ac..1dfd7290b8f 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -570,11 +570,12 @@ Ice::stringToIdentity(const string& s) // Find unescaped separator; note that the string may contain an escaped // backslash before the separator. // - string::size_type slash = string::npos, pos = 0; + string::size_type slash = string::npos; + string::size_type pos = 0; while((pos = s.find('/', pos)) != string::npos) { - int escapes = 0; - while(static_cast<int>(pos) - escapes > 0 && s[pos - escapes - 1] == '\\') + string::size_type escapes = 0; + while(static_cast<int>(pos - escapes) > 0 && s[pos - escapes - 1] == '\\') { escapes++; } |