]> git.lyx.org Git - features.git/commitdiff
Work around a bug in gcc 2.95's STL implementation.
authorAngus Leeming <leeming@lyx.org>
Tue, 15 Feb 2005 18:56:07 +0000 (18:56 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 15 Feb 2005 18:56:07 +0000 (18:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9637 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/ChangeLog
src/support/environment.C

index 5d482bb7ac98fe78528c3af5fe97b707ab810cd9..83ed159fcbb5261ec4cee7060f06f1627de3612b 100644 (file)
@@ -1,6 +1,7 @@
 2005-02-15  Angus Leeming  <leeming@lyx.org>
 
        * environment.C: add missing #include.
+       (setEnvPath): compare iterators rather than use tellp().
 
 2005-02-15  Angus Leeming  <leeming@lyx.org>
 
index 7722035edcf75e92edf7825839be44abf4f562f7..22102ef73cba6f053908b38edf1bec41902f5313 100644 (file)
@@ -89,10 +89,11 @@ void setEnvPath(string const & name, vector<string> const & env)
 {
        char const separator(os::path_separator());
        std::ostringstream ss;
-       vector<string>::const_iterator it = env.begin();
+       vector<string>::const_iterator const begin = env.begin();
        vector<string>::const_iterator const end = env.end();
+       vector<string>::const_iterator it = begin;
        for (; it != end; ++it) {
-               if (ss.tellp() > 0)
+               if (it != begin)
                        ss << separator;
                ss << os::external_path(*it);
        }