diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-02-21 21:05:14 +0100 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-02-21 23:14:31 +0200 |
commit | 60d3dd98a44230c21803c1606552ee098ed9fa7c (patch) | |
tree | af0aa11c458ca86f786560e0875f7e018e1a16b9 /indra/newview/llworldmapview.cpp | |
parent | 855eea7ddf9e1de9226036ca94ccb03ac0e311b9 (diff) |
Convert remaining BOOL to bool
Diffstat (limited to 'indra/newview/llworldmapview.cpp')
-rwxr-xr-x | indra/newview/llworldmapview.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 2a44c7e4aa..c5dac2be72 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -75,7 +75,7 @@ constexpr F32 OCEAN_BLUE = (F32)(0x5F)/255.f; constexpr F32 GODLY_TELEPORT_HEIGHT = 200.f; constexpr F32 BIG_DOT_RADIUS = 5.f; -BOOL LLWorldMapView::sHandledLastClick = FALSE; +bool LLWorldMapView::sHandledLastClick = false; LLUIImagePtr LLWorldMapView::sAvatarSmallImage = NULL; LLUIImagePtr LLWorldMapView::sAvatarYouImage = NULL; @@ -174,12 +174,12 @@ void LLWorldMapView::cleanupClass() LLWorldMapView::LLWorldMapView() : LLPanel(), mBackgroundColor(LLColor4(OCEAN_RED, OCEAN_GREEN, OCEAN_BLUE, 1.f)), - mItemPicked(FALSE), + mItemPicked(false), mPanX(0.f), mPanY(0.f), mTargetPanX(0.f), mTargetPanY(0.f), - mPanning(FALSE), + mPanning(false), mMouseDownPanX(0), mMouseDownPanY(0), mMouseDownX(0), @@ -325,7 +325,7 @@ void LLWorldMapView::translatePan(S32 delta_x, S32 delta_y) // static -void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap) +void LLWorldMapView::setPan(S32 x, S32 y, bool snap) { mMapIterpTime = MAP_ITERP_TIME_CONSTANT; mTargetPanX = (F32) x; @@ -339,7 +339,7 @@ void LLWorldMapView::setPan(S32 x, S32 y, BOOL snap) } // static -void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, BOOL snap, F32 interp_time) +void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, bool snap, F32 interp_time) { setPan(x, y, snap); mMapIterpTime = interp_time; @@ -350,7 +350,7 @@ bool LLWorldMapView::showRegionInfo() { return (LLWorldMipmap::scaleToLevel(mMap /////////////////////////////////////////////////////////////////////////////////// // HELPERS -BOOL is_agent_in_region(LLViewerRegion* region, LLSimInfo* info) +bool is_agent_in_region(LLViewerRegion* region, LLSimInfo* info) { return (region && info && info->isName(region->getName())); } @@ -520,7 +520,7 @@ void LLWorldMapView::draw() S32_MAX, //max_chars mMapScale, //max_pixels NULL, - TRUE); //use ellipses + true); //use ellipses } } } @@ -552,7 +552,7 @@ void LLWorldMapView::draw() { drawTracking(pos_global, lerp(LLColor4::yellow, LLColor4::orange, 0.4f), - TRUE, + true, "You are here", "", LLFontGL::getFontSansSerifSmall()->getLineHeight()); // offset vertically by one line, to avoid overlap with target tracking @@ -572,7 +572,7 @@ void LLWorldMapView::draw() LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); if ( LLTracker::TRACKING_AVATAR == tracking_status ) { - drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, TRUE, LLTracker::getLabel(), "" ); + drawTracking( LLAvatarTracker::instance().getGlobalPos(), map_track_color, true, LLTracker::getLabel(), "" ); } else if ( LLTracker::TRACKING_LANDMARK == tracking_status || LLTracker::TRACKING_LOCATION == tracking_status ) @@ -582,7 +582,7 @@ void LLWorldMapView::draw() LLVector3d pos_global = LLTracker::getTrackedPositionGlobal(); if (!pos_global.isExactlyZero()) { - drawTracking( pos_global, map_track_color, TRUE, LLTracker::getLabel(), LLTracker::getToolTip() ); + drawTracking( pos_global, map_track_color, true, LLTracker::getLabel(), LLTracker::getToolTip() ); } } else if (LLWorldMap::getInstance()->isTracking()) @@ -591,7 +591,7 @@ void LLWorldMapView::draw() { // We know this location to be invalid, draw a blue circle LLColor4 loading_color(0.0, 0.5, 1.0, 1.0); - drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("InvalidLocation"), ""); + drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, true, getString("InvalidLocation"), ""); } else { @@ -599,7 +599,7 @@ void LLWorldMapView::draw() double value = fmod(current_time, 2); value = 0.5 + 0.5*cos(value * F_PI); LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0); - drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, TRUE, getString("Loading"), ""); + drawTracking( LLWorldMap::getInstance()->getTrackedPositionGlobal(), loading_color, true, getString("Loading"), ""); } } @@ -831,8 +831,8 @@ void LLWorldMapView::drawItems() bool mature_enabled = gAgent.canAccessMature(); bool adult_enabled = gAgent.canAccessAdult(); - BOOL show_mature = mature_enabled && gSavedSettings.getBOOL("ShowMatureEvents"); - BOOL show_adult = adult_enabled && gSavedSettings.getBOOL("ShowAdultEvents"); + bool show_mature = mature_enabled && gSavedSettings.getBOOL("ShowMatureEvents"); + bool show_adult = adult_enabled && gSavedSettings.getBOOL("ShowAdultEvents"); for (handle_list_t::iterator iter = mVisibleRegions.begin(); iter != mVisibleRegions.end(); ++iter) { @@ -990,7 +990,7 @@ LLVector3 LLWorldMapView::globalPosToView( const LLVector3d& global_pos ) } -void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& color, BOOL draw_arrow, +void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4& color, bool draw_arrow, const std::string& label, const std::string& tooltip, S32 vert_offset ) { LLVector3 pos_local = globalPosToView( pos_global ); @@ -1546,7 +1546,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, false)) { *hit_type = MAP_ITEM_PG_EVENT; - mItemPicked = TRUE; + mItemPicked = true; gFloaterWorldMap->trackEvent(event); return; } @@ -1562,7 +1562,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, false)) { *hit_type = MAP_ITEM_MATURE_EVENT; - mItemPicked = TRUE; + mItemPicked = true; gFloaterWorldMap->trackEvent(event); return; } @@ -1578,7 +1578,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, false)) { *hit_type = MAP_ITEM_ADULT_EVENT; - mItemPicked = TRUE; + mItemPicked = true; gFloaterWorldMap->trackEvent(event); return; } @@ -1594,7 +1594,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, true)) { *hit_type = MAP_ITEM_LAND_FOR_SALE; - mItemPicked = TRUE; + mItemPicked = true; return; } ++it; @@ -1611,7 +1611,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, if (checkItemHit(x, y, event, id, true)) { *hit_type = MAP_ITEM_LAND_FOR_SALE_ADULT; - mItemPicked = TRUE; + mItemPicked = true; return; } ++it; @@ -1624,7 +1624,7 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, // If we get here, we haven't clicked on anything gFloaterWorldMap->trackLocation(pos_global); - mItemPicked = FALSE; + mItemPicked = false; *id = LLUUID::null; return; } @@ -1638,7 +1638,7 @@ bool LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask ) mMouseDownPanY = ll_round(mPanY); mMouseDownX = x; mMouseDownY = y; - sHandledLastClick = TRUE; + sHandledLastClick = true; return true; } @@ -1658,7 +1658,7 @@ bool LLWorldMapView::handleMouseUp( S32 x, S32 y, MASK mask ) LLUI::getInstance()->setMousePositionLocal(this, local_x, local_y); // finish the pan - mPanning = FALSE; + mPanning = false; mMouseDownX = 0; mMouseDownY = 0; @@ -1717,7 +1717,7 @@ bool LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) // just started panning, so hide cursor if (!mPanning) { - mPanning = TRUE; + mPanning = true; gViewerWindow->hideCursor(); } |