diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-12-20 09:39:31 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-12-20 09:39:31 -0500 |
commit | 2499f6bcff53812d1d8bd1a73d657ef1861d7482 (patch) | |
tree | ccdf0398eb4424e5e3a190793d53d647db2ddc0e /indra/newview | |
parent | 42b8895c54a1ab9aa019d4e60b5cf432506aff44 (diff) |
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?"
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterbump.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llfloaterbump.cpp b/indra/newview/llfloaterbump.cpp index 957c91b226..33e4c7cd5f 100644 --- a/indra/newview/llfloaterbump.cpp +++ b/indra/newview/llfloaterbump.cpp @@ -184,7 +184,7 @@ void LLFloaterBump::onScrollListRightClicked(LLUICtrl* ctrl, S32 x, S32 y) std::string mute_msg = (LLMuteList::getInstance()->isMuted(mItemUUID, mNames[mItemUUID])) ? "UnmuteAvatar" : "MuteAvatar"; mPopupMenu->getChild<LLUICtrl>("Avatar Mute")->setValue(LLTrans::getString(mute_msg)); - mPopupMenu->setItemEnabled(std::string("Zoom In"), (BOOL)gObjectList.findObject(mItemUUID)); + mPopupMenu->setItemEnabled(std::string("Zoom In"), bool(gObjectList.findObject(mItemUUID))); ((LLContextMenu*)mPopupMenu)->show(x, y); LLMenuGL::showPopup(ctrl, mPopupMenu, x, y); 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); } |