From fc2aa383f857ab7a666d8e52835fe73c904b3238 Mon Sep 17 00:00:00 2001 From: Paul Molodowitch Date: Wed, 11 Dec 2024 10:39:01 -0800 Subject: [PATCH] [hdx] taskController: remove unnecessary if/else branches simple bool funcs --- pxr/imaging/hdx/taskController.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pxr/imaging/hdx/taskController.cpp b/pxr/imaging/hdx/taskController.cpp index 45737d1479..4bc82e2ff5 100644 --- a/pxr/imaging/hdx/taskController.cpp +++ b/pxr/imaging/hdx/taskController.cpp @@ -162,11 +162,7 @@ HdxTaskController::_Delegate::GetTaskRenderTags(SdfPath const& taskId) static bool _IsStormRenderingBackend(HdRenderIndex const *index) { - if(!dynamic_cast(index->GetRenderDelegate())) { - return false; - } - - return true; + return bool(dynamic_cast(index->GetRenderDelegate())); } static GfVec2i @@ -652,10 +648,7 @@ HdxTaskController::_SelectionEnabled() const bool HdxTaskController::_ColorizeSelectionEnabled() const { - if (_viewportAov == HdAovTokens->color) { - return true; - } - return false; + return _viewportAov == HdAovTokens->color; } bool @@ -678,10 +671,7 @@ bool HdxTaskController::_VisualizeAovEnabled() const { // Only non-color AOVs need special colorization for viz. - if (_viewportAov != HdAovTokens->color) { - return true; - } - return false; + return _viewportAov != HdAovTokens->color; } bool