summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-05-06 16:48:58 -0500
commitc6d752b880cacca8fb8f10f28790a50161fcb9ab (patch)
tree14910a69597962134f2e78e864a2f05962a16356 /indra/newview/llfloatermodelpreview.cpp
parent76101843c0d390c25a783f212eb1ea75e508ada4 (diff)
parent7d87e41bbd5d4761b1eb17e49b7a00b948d84213 (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into gltf-dev-maint-a-merge
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index c37d8fae53..c276a221d6 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -75,15 +75,15 @@ LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL;
// should be represented by Retain spinner with values from 1 to 100 by 1.
// To achieve this, RETAIN_COEFFICIENT is used while creating spinner
// and when value is requested from spinner.
-const double RETAIN_COEFFICIENT = 100;
+constexpr double RETAIN_COEFFICIENT = 100;
// "Cosine%" decomp parameter has values from 0.9 to 1 by 0.001
// But according to the UI spec for upload model floater, this parameter
// should be represented by Smooth combobox with only 10 values.
// So this const is used as a size of Smooth combobox list.
-const S32 SMOOTH_VALUES_NUMBER = 10;
-const S32 PREVIEW_RENDER_SIZE = 1024;
-const F32 PREVIEW_CAMERA_DISTANCE = 16.f;
+constexpr S32 SMOOTH_VALUES_NUMBER = 10;
+constexpr S32 PREVIEW_RENDER_SIZE = 1024;
+constexpr F32 PREVIEW_CAMERA_DISTANCE = 16.f;
class LLMeshFilePicker : public LLFilePickerThread
{
@@ -148,11 +148,11 @@ mAvatarTabIndex(0)
//-----------------------------------------------------------------------------
// postBuild()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::postBuild()
+bool LLFloaterModelPreview::postBuild()
{
if (!LLFloater::postBuild())
{
- return FALSE;
+ return false;
}
childSetCommitCallback("cancel_btn", onCancel, this);
@@ -283,14 +283,14 @@ BOOL LLFloaterModelPreview::postBuild()
mCalculateBtn->setEnabled(false);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// reshape()
//-----------------------------------------------------------------------------
-void LLFloaterModelPreview::reshape(S32 width, S32 height, BOOL called_from_parent)
+void LLFloaterModelPreview::reshape(S32 width, S32 height, bool called_from_parent)
{
LLFloaterModelUploadBase::reshape(width, height, called_from_parent);
@@ -849,7 +849,7 @@ void LLFloaterModelPreview::draw()
//-----------------------------------------------------------------------------
// handleMouseDown()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
+bool LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
{
if (mPreviewRect.pointInRect(x, y))
{
@@ -858,7 +858,7 @@ BOOL LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
mLastMouseX = x;
mLastMouseY = y;
- return TRUE;
+ return true;
}
return LLFloater::handleMouseDown(x, y, mask);
@@ -867,9 +867,9 @@ BOOL LLFloaterModelPreview::handleMouseDown(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleMouseUp()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask)
+bool LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gFocusMgr.setMouseCapture(FALSE);
+ gFocusMgr.setMouseCapture(nullptr);
gViewerWindow->showCursor();
return LLFloater::handleMouseUp(x, y, mask);
}
@@ -877,7 +877,7 @@ BOOL LLFloaterModelPreview::handleMouseUp(S32 x, S32 y, MASK mask)
//-----------------------------------------------------------------------------
// handleHover()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
+bool LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
{
MASK local_mask = mask & ~MASK_ALT;
@@ -928,13 +928,13 @@ BOOL LLFloaterModelPreview::handleHover (S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(UI_CURSOR_TOOLZOOMIN);
}
- return TRUE;
+ return true;
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
//-----------------------------------------------------------------------------
-BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
+bool LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
if (mPreviewRect.pointInRect(x, y) && mModelPreview)
{
@@ -945,7 +945,7 @@ BOOL LLFloaterModelPreview::handleScrollWheel(S32 x, S32 y, S32 clicks)
{
LLFloaterModelUploadBase::handleScrollWheel(x, y, clicks);
}
- return TRUE;
+ return true;
}
/*virtual*/