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:
@@ -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);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user