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/branches/WX_3_0_BRANCH@77986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-10-11 15:47:53 +00:00
parent 75ce7fb68b
commit 38e6f2d117

View File

@@ -315,9 +315,9 @@ wxAppTraits *wxAppConsoleBase::GetTraitsIfExists()
wxAppTraits& wxAppConsoleBase::GetValidTraits()
{
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);
}
// ----------------------------------------------------------------------------