Avoid calling prefixIs() if not needed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29824 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-05-23 13:16:13 +00:00
parent d1ebeea288
commit 7ae4f6ac6f
3 changed files with 3 additions and 3 deletions

View File

@ -185,7 +185,7 @@ bool path_prefix_is(string & path, string const & pre, path_case how)
if (i + 1 != p2.length()) if (i + 1 != p2.length())
return false; 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)); path = to_utf8(p2 + p1.substr(i + 1, p1.length() - i + 1));
return true; return true;

View File

@ -98,7 +98,7 @@ bool path_prefix_is(string & path, string const & pre, path_case how)
if (i + 1 != p2.length()) if (i + 1 != p2.length())
return false; 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)); path = to_utf8(p2 + p1.substr(i + 1, p1.length() - i + 1));
return true; return true;

View File

@ -216,7 +216,7 @@ bool path_prefix_is(string & path, string const & pre, path_case how)
if (i + 1 != p2.length()) if (i + 1 != p2.length())
return false; 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)); path = to_utf8(p2 + p1.substr(i + 1, p1.length() - i + 1));
return true; return true;