]> git.saurik.com Git - wxWidgets.git/commit
Rewrite wxLogXXX() macros to avoid "ambiguous else" warnings.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Aug 2013 17:41:16 +0000 (17:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 31 Aug 2013 17:41:16 +0000 (17:41 +0000)
commit66b370d05f08fd76ae08d2eee7fd8704815274bd
treee64d72e8e7fbc17320cec81a89561f6bac550bc4
parent79808683476f5b53745b001f0d4b96db6256618a
Rewrite wxLogXXX() macros to avoid "ambiguous else" warnings.

Use a dummy for loop instead of an if statement to avoid all problems with the
dangling else clauses: both the need for an artificially inversed "if" to make
the code like

if ( something )
wxLogError("...");
else
something-else;

to work as expected and to avoid warnings given by some versions of g++ and
clang for the code above advising to add explicit braces.

Closes #11829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/log.h
tests/log/logtest.cpp