diff options
author | Marc Laukien <marc@zeroc.com> | 2002-05-06 13:13:40 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-05-06 13:13:40 +0000 |
commit | 5f6b296bbca7055e10258736008ef6c28f1ea0c4 (patch) | |
tree | 748404d46154fe81c5e2510a499f12882217bb80 /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | adding Glacier session demo (diff) | |
download | ice-5f6b296bbca7055e10258736008ef6c28f1ea0c4.tar.bz2 ice-5f6b296bbca7055e10258736008ef6c28f1ea0c4.tar.xz ice-5f6b296bbca7055e10258736008ef6c28f1ea0c4.zip |
fix
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 27e31914a31..bc744762e34 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -31,12 +31,16 @@ string Slice::changeInclude(const string& orig, const vector<string>& includePaths) { string file = orig; - + replace(file.begin(), file.end(), '\\', '/'); + for (vector<string>::const_iterator p = includePaths.begin(); p != includePaths.end(); ++p) { - if (orig.compare(0, p->length(), *p) == 0) + string includePath = *p; + replace(includePath.begin(), includePath.end(), '\\', '/'); + + if (orig.compare(0, includePath.length(), *p) == 0) { - string s = orig.substr(p->length()); + string s = orig.substr(includePath.length()); if (s.size() < file.size()) { file = s; |