From c285f59ce2a05703e3a1232fcaf3ee3aea714b3f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 18 Feb 2024 12:52:19 +0100 Subject: Replace BOOL with bool in llwindow and dependent classes --- indra/newview/lltoolindividual.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/lltoolindividual.cpp') diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp index 885c1442a0..c637427bc7 100644 --- a/indra/newview/lltoolindividual.cpp +++ b/indra/newview/lltoolindividual.cpp @@ -66,10 +66,10 @@ LLToolIndividual::~LLToolIndividual() { } -BOOL LLToolIndividual::handleMouseDown(S32 x, S32 y, MASK mask) +bool LLToolIndividual::handleMouseDown(S32 x, S32 y, MASK mask) { gViewerWindow->pickAsync(x, y, mask, pickCallback); - return TRUE; + return true; } void LLToolIndividual::pickCallback(const LLPickInfo& pick_info) @@ -82,20 +82,20 @@ void LLToolIndividual::pickCallback(const LLPickInfo& pick_info) } } -BOOL LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask) +bool LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask) { if(!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { // You should already have an object selected from the mousedown. // If so, show its inventory. LLFloaterReg::showInstance("build", "Content"); - return TRUE; + return true; } else { // Nothing selected means the first mouse click was probably // bad, so try again. - return FALSE; + return false; } } -- cgit v1.2.3 From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/lltoolindividual.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoolindividual.cpp') diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp index c637427bc7..bf31f77f49 100644 --- a/indra/newview/lltoolindividual.cpp +++ b/indra/newview/lltoolindividual.cpp @@ -101,7 +101,7 @@ bool LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask) void LLToolIndividual::handleSelect() { - const BOOL children_ok = TRUE; + const bool children_ok = true; LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); LLSelectMgr::getInstance()->deselectAll(); if(obj) -- cgit v1.2.3 From e2e37cced861b98de8c1a7c9c0d3a50d2d90e433 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 May 2024 21:25:21 +0200 Subject: Fix line endlings --- indra/newview/lltoolindividual.cpp | 230 ++++++++++++++++++------------------- 1 file changed, 115 insertions(+), 115 deletions(-) (limited to 'indra/newview/lltoolindividual.cpp') diff --git a/indra/newview/lltoolindividual.cpp b/indra/newview/lltoolindividual.cpp index e1fd1abeb2..8962c55273 100644 --- a/indra/newview/lltoolindividual.cpp +++ b/indra/newview/lltoolindividual.cpp @@ -1,115 +1,115 @@ -/** - * @file lltoolindividual.cpp - * @brief LLToolIndividual class implementation - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -//***************************************************************************** -// -// This is a tool for selecting individual object from the -// toolbox. Handy for when you want to deal with child object -// inventory... -// -//***************************************************************************** - -#include "llviewerprecompiledheaders.h" -#include "lltoolindividual.h" - -#include "llfloaterreg.h" -#include "llselectmgr.h" -#include "llviewerobject.h" -#include "llviewerwindow.h" -#include "llfloatertools.h" - -///---------------------------------------------------------------------------- -/// Globals -///---------------------------------------------------------------------------- - - -///---------------------------------------------------------------------------- -/// Local function declarations, constants, enums, and typedefs -///---------------------------------------------------------------------------- - - -///---------------------------------------------------------------------------- -/// Class LLToolIndividual -///---------------------------------------------------------------------------- - -// Default constructor -LLToolIndividual::LLToolIndividual() -: LLTool(std::string("Individual")) -{ -} - -// Destroys the object -LLToolIndividual::~LLToolIndividual() -{ -} - -bool LLToolIndividual::handleMouseDown(S32 x, S32 y, MASK mask) -{ - gViewerWindow->pickAsync(x, y, mask, pickCallback); - return true; -} - -void LLToolIndividual::pickCallback(const LLPickInfo& pick_info) -{ - LLViewerObject* obj = pick_info.getObject(); - LLSelectMgr::getInstance()->deselectAll(); - if(obj) - { - LLSelectMgr::getInstance()->selectObjectOnly(obj); - } -} - -bool LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask) -{ - if(!LLSelectMgr::getInstance()->getSelection()->isEmpty()) - { - // You should already have an object selected from the mousedown. - // If so, show its inventory. - LLFloaterReg::showInstance("build", "Content"); - return true; - } - else - { - // Nothing selected means the first mouse click was probably - // bad, so try again. - return false; - } -} - -void LLToolIndividual::handleSelect() -{ - const bool children_ok = true; - LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); - LLSelectMgr::getInstance()->deselectAll(); - if(obj) - { - LLSelectMgr::getInstance()->selectObjectOnly(obj); - } -} - -///---------------------------------------------------------------------------- -/// Local function definitions -///---------------------------------------------------------------------------- +/** + * @file lltoolindividual.cpp + * @brief LLToolIndividual class implementation + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +//***************************************************************************** +// +// This is a tool for selecting individual object from the +// toolbox. Handy for when you want to deal with child object +// inventory... +// +//***************************************************************************** + +#include "llviewerprecompiledheaders.h" +#include "lltoolindividual.h" + +#include "llfloaterreg.h" +#include "llselectmgr.h" +#include "llviewerobject.h" +#include "llviewerwindow.h" +#include "llfloatertools.h" + +///---------------------------------------------------------------------------- +/// Globals +///---------------------------------------------------------------------------- + + +///---------------------------------------------------------------------------- +/// Local function declarations, constants, enums, and typedefs +///---------------------------------------------------------------------------- + + +///---------------------------------------------------------------------------- +/// Class LLToolIndividual +///---------------------------------------------------------------------------- + +// Default constructor +LLToolIndividual::LLToolIndividual() +: LLTool(std::string("Individual")) +{ +} + +// Destroys the object +LLToolIndividual::~LLToolIndividual() +{ +} + +bool LLToolIndividual::handleMouseDown(S32 x, S32 y, MASK mask) +{ + gViewerWindow->pickAsync(x, y, mask, pickCallback); + return true; +} + +void LLToolIndividual::pickCallback(const LLPickInfo& pick_info) +{ + LLViewerObject* obj = pick_info.getObject(); + LLSelectMgr::getInstance()->deselectAll(); + if(obj) + { + LLSelectMgr::getInstance()->selectObjectOnly(obj); + } +} + +bool LLToolIndividual::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + if(!LLSelectMgr::getInstance()->getSelection()->isEmpty()) + { + // You should already have an object selected from the mousedown. + // If so, show its inventory. + LLFloaterReg::showInstance("build", "Content"); + return true; + } + else + { + // Nothing selected means the first mouse click was probably + // bad, so try again. + return false; + } +} + +void LLToolIndividual::handleSelect() +{ + const bool children_ok = true; + LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); + LLSelectMgr::getInstance()->deselectAll(); + if(obj) + { + LLSelectMgr::getInstance()->selectObjectOnly(obj); + } +} + +///---------------------------------------------------------------------------- +/// Local function definitions +///---------------------------------------------------------------------------- -- cgit v1.2.3