From 0fb7f1cd0b2c830e8e126e12a0d0c727fa986ba0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 11 Oct 2014 16:29:33 +0000 Subject: [PATCH] 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 --- src/common/appbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 6ab6b2c5f1..712d171f1c 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -335,9 +335,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); } // ----------------------------------------------------------------------------