From 2499f6bcff53812d1d8bd1a73d657ef1861d7482 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 09:39:31 -0500 Subject: DRTVWR-418: Casting pointer to BOOL is just wrong. Since BOOL is simply a typedef for int, casting a 64-bit pointer to 32-bit int is correctly diagnosed by the compiler as an error. What works is to cast the pointer to (lowercase) bool, the builtin type, which engages the compiler's test for "is this pointer NULL?" --- indra/newview/llfloaterimnearbychat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimnearbychat.cpp') diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index 257b39a7dd..e9af22d336 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -282,7 +282,7 @@ void LLFloaterIMNearbyChat::onTearOffClicked() LLFloaterIMSessionTab::onTearOffClicked(); // see CHUI-170: Save torn-off state of the nearby chat between sessions - BOOL in_the_multifloater = (BOOL)getHost(); + bool in_the_multifloater(getHost()); gSavedPerAccountSettings.setBOOL("NearbyChatIsNotTornOff", in_the_multifloater); } -- cgit v1.2.3