]> git.lyx.org Git - features.git/commitdiff
Avoid calling prefixIs() if not needed.
authorEnrico Forestieri <forenr@lyx.org>
Sat, 23 May 2009 13:16:13 +0000 (13:16 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 23 May 2009 13:16:13 +0000 (13:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29824 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/os_cygwin.cpp
src/support/os_unix.cpp
src/support/os_win32.cpp

index 3ab910fedd56750358bef93c0b4cbbf3898fc795..1bfffdc8285d3de7b6a101cdc87a15d4bde65e05 100644 (file)
@@ -185,7 +185,7 @@ bool path_prefix_is(string & path, string const & pre, path_case how)
        if (i + 1 != p2.length())
                return false;
 
-       if (!prefixIs(path, pre) && how == CASE_ADJUSTED)
+       if (how == CASE_ADJUSTED && !prefixIs(path, pre))
                path = to_utf8(p2 + p1.substr(i + 1, p1.length() - i + 1));
 
        return true;
index 976fcf75e86a34c277a69e71abb682acd9211605..15c5e633692fe3e4ba096369d0f8cccd740b9009 100644 (file)
@@ -98,7 +98,7 @@ bool path_prefix_is(string & path, string const & pre, path_case how)
        if (i + 1 != p2.length())
                return false;
 
-       if (!prefixIs(path, pre) && how == CASE_ADJUSTED)
+       if (how == CASE_ADJUSTED && !prefixIs(path, pre))
                path = to_utf8(p2 + p1.substr(i + 1, p1.length() - i + 1));
 
        return true;
index 732cdc55aba613e579b39c7c42a39c19539ade43..722895b1cf6c0051b6fbf8e2e173f90be0b2df5c 100644 (file)
@@ -216,7 +216,7 @@ bool path_prefix_is(string & path, string const & pre, path_case how)
        if (i + 1 != p2.length())
                return false;
 
-       if (!prefixIs(path, pre) && how == CASE_ADJUSTED)
+       if (how == CASE_ADJUSTED && !prefixIs(path, pre))
                path = to_utf8(p2 + p1.substr(i + 1, p1.length() - i + 1));
 
        return true;