Compilation fix for Borland compiler bug with ternary operator.

Don't use ?: operator with references, Borland wrongly deduces the common type
as being an object in this case, so use pointers instead and dereference later.

See #16592.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-10-11 16:29:33 +00:00
parent 2df4b4505e
commit 0fb7f1cd0b

View File

@@ -335,9 +335,9 @@ wxAppTraits *wxAppConsoleBase::GetTraitsIfExists()
wxAppTraits& wxAppConsoleBase::GetValidTraits() wxAppTraits& wxAppConsoleBase::GetValidTraits()
{ {
static wxConsoleAppTraits s_traitsConsole; static wxConsoleAppTraits s_traitsConsole;
wxAppTraits* const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; wxAppTraits* const traits = (wxTheApp ? wxTheApp->GetTraits() : NULL);
return traits ? *traits : s_traitsConsole; return *(traits ? traits : &s_traitsConsole);
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------