diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-01-27 21:51:28 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-01-27 21:51:28 +0000 |
commit | c4b66148435528ac793896c1586cc6a5ca4a6550 (patch) | |
tree | 14b0f1fb3fc4617d48e91db6962af3b234c596fb /cpp/src/slice2cppe/Gen.cpp | |
parent | Use size constructor and swap instead of resize (diff) | |
download | ice-c4b66148435528ac793896c1586cc6a5ca4a6550.tar.bz2 ice-c4b66148435528ac793896c1586cc6a5ca4a6550.tar.xz ice-c4b66148435528ac793896c1586cc6a5ca4a6550.zip |
fix for path with mixed separators
Diffstat (limited to 'cpp/src/slice2cppe/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 69a8279a9fe..627d1d12560 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -61,11 +61,7 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte } } - string::size_type pos = _base.rfind('/'); - if(pos == string::npos) - { - pos = _base.rfind('\\'); - } + string::size_type pos = _base.find_last_of("/\\"); if(pos != string::npos) { _base.erase(0, pos + 1); |