]> git.saurik.com Git - wxWidgets.git/commit
Use single BeforeLast() call in wxConfigPathChanger ctor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 22 Oct 2010 14:17:42 +0000 (14:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 22 Oct 2010 14:17:42 +0000 (14:17 +0000)
commit1af292a686568e354b0886fcde3b280d1c845d30
tree2f7880a0092ab90df0f33d0c5bdbae21f144e5b4
parent6becc1e617c65cde68e7e6fcdad27e366bf51792
Use single BeforeLast() call in wxConfigPathChanger ctor.

Use a single BeforeLast() call with the "rest" argument and avoid calling
AfterLast() laster in wxConfigPathChanger ctor.

This is a small optimization which may count because wxConfigPathChanger is
used in a lot of wxFileConfig functions but, even more importantly, this works
around a bug in g++ 4 optimized build when the name was not filled by
AfterLast() call correctly as apparently the optimizer decided it was not
used. The real cause of this compiler bug was difficult to find as it couldn't
be reproduced in a simple test case but this change avoids it and fixes
wxFileConfig unit test in optimized build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/config.cpp