From 4419bb870986c6900fc096338622d27b999cd771 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Sun, 11 Feb 2024 01:23:28 +0100 Subject: more misc: BOOL (int) to real bool --- indra/newview/llsetkeybinddialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 74844a80e8..c5a8380eff 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -53,11 +53,11 @@ public: virtual ~Updater(){} protected: - BOOL tick() + bool tick() { mCallback(mMask); // Deletes itseft after execution - return TRUE; + return true; } private: -- cgit v1.2.3 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/llsetkeybinddialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index c5a8380eff..293073c9a1 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -272,14 +272,14 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down) return true; } -BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, BOOL down) +bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClickType clicktype, bool down) { - BOOL result = FALSE; + bool result = false; if (!pParent) { // we already processed 'down' event, this is 'up', consume closeFloater(); - result = TRUE; + result = true; } if (!result && clicktype == CLICK_LEFT) { @@ -305,7 +305,7 @@ BOOL LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic { // Note: default doubleclick time is 500ms, but can stretch up to 5s pUpdater = new Updater(boost::bind(&onClickTimeout, this, _1), 0.7f, mask); - result = TRUE; + result = true; } } } -- cgit v1.2.3 From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/llsetkeybinddialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 293073c9a1..61bf39fa61 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -88,19 +88,19 @@ LLSetKeyBindDialog::~LLSetKeyBindDialog() } //virtual -BOOL LLSetKeyBindDialog::postBuild() +bool LLSetKeyBindDialog::postBuild() { childSetAction("SetEmpty", onBlank, this); childSetAction("Default", onDefault, this); childSetAction("Cancel", onCancel, this); - getChild("Cancel")->setFocus(TRUE); + getChild("Cancel")->setFocus(true); pCheckBox = getChild("apply_all"); pDescription = getChild("description"); - gFocusMgr.setKeystrokesOnly(TRUE); + gFocusMgr.setKeystrokesOnly(true); - return TRUE; + return true; } //virtual -- 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/llsetkeybinddialog.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 61bf39fa61..1e5a67302a 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -165,7 +165,7 @@ void LLSetKeyBindDialog::setParent(LLKeyBindResponderInterface* parent, LLView* } // static -bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down) +bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, bool down) { if (sRecordKeys) { @@ -183,7 +183,7 @@ bool LLSetKeyBindDialog::recordKey(KEY key, MASK mask, BOOL down) return false; } -bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down) +bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, bool down) { if ((key == 'Q' && mask == MASK_CONTROL) || key == KEY_ESCAPE) @@ -217,7 +217,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, BOOL down) // Masks by themself are not allowed return false; } - if (down == TRUE) + if (down == true) { // Most keys are handled on 'down' event because menu is handled on 'down' // masks are exceptions to let other keys be handled @@ -294,8 +294,8 @@ bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic } if (result) { - setFocus(TRUE); - gFocusMgr.setKeystrokesOnly(TRUE); + setFocus(true); + gFocusMgr.setKeystrokesOnly(true); } // ignore selection related combinations else if (down && (mask & (MASK_SHIFT | MASK_CONTROL)) == 0) @@ -317,7 +317,7 @@ bool LLSetKeyBindDialog::handleAnyMouseClick(S32 x, S32 y, MASK mask, EMouseClic && ((mKeyFilterMask & ALLOW_MASK_MOUSE) != 0 || mask == 0)) // reserved for selection { setKeyBind(clicktype, KEY_NONE, mask, pCheckBox->getValue().asBoolean()); - result = TRUE; + result = true; if (!down) { // wait for 'up' event before closing -- cgit v1.2.3 From f9473e8afcb624cc1b101195bf15943ec372b56f Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 6 May 2024 16:52:34 +0200 Subject: secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries --- indra/newview/llsetkeybinddialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index 1e5a67302a..dc3b34b1b9 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -217,7 +217,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, bool down) // Masks by themself are not allowed return false; } - if (down == true) + if (down) { // Most keys are handled on 'down' event because menu is handled on 'down' // masks are exceptions to let other keys be handled -- cgit v1.2.3 From a0b3021bdcf76859054fda8e30abb3ed47749e83 Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Wed, 29 May 2024 08:10:00 -0700 Subject: Trim trailing whitespace Start trimming trailing whitespace, but limit the blast radius to a handful of file types. --- indra/newview/llsetkeybinddialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index dbab7e53b6..5fa82e5a4f 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -1,25 +1,25 @@ -/** +/** * @file llsetkeybinddialog.cpp * @brief LLSetKeyBindDialog class implementation. * * $LicenseInfo:firstyear=2019&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2019, 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$ */ -- cgit v1.2.3 From becdc46bdc319b513e24f4338f6b8d95fab45575 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 11 Jul 2024 18:53:54 +0300 Subject: viewer#1988 "Set empty" for controls ignores "Apply to all" --- indra/newview/llsetkeybinddialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsetkeybinddialog.cpp') diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp index e172e15a0e..5dbd579b45 100644 --- a/indra/newview/llsetkeybinddialog.cpp +++ b/indra/newview/llsetkeybinddialog.cpp @@ -337,8 +337,8 @@ void LLSetKeyBindDialog::onCancel(void* user_data) void LLSetKeyBindDialog::onBlank(void* user_data) { LLSetKeyBindDialog* self = (LLSetKeyBindDialog*)user_data; - // tmp needs 'no key' button - self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, false); + + self->setKeyBind(CLICK_NONE, KEY_NONE, MASK_NONE, self->pCheckBox->getValue().asBoolean()); self->closeFloater(); } -- cgit v1.2.3