Skip to content

Commit

Permalink
[hdx] taskController: remove unnecessary if/else branches simple bool…
Browse files Browse the repository at this point in the history
… funcs
  • Loading branch information
pmolodo committed Dec 18, 2024
1 parent 52c4842 commit fc2aa38
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions pxr/imaging/hdx/taskController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ HdxTaskController::_Delegate::GetTaskRenderTags(SdfPath const& taskId)
static bool
_IsStormRenderingBackend(HdRenderIndex const *index)
{
if(!dynamic_cast<HdStRenderDelegate*>(index->GetRenderDelegate())) {
return false;
}

return true;
return bool(dynamic_cast<HdStRenderDelegate*>(index->GetRenderDelegate()));
}

static GfVec2i
Expand Down Expand Up @@ -652,10 +648,7 @@ HdxTaskController::_SelectionEnabled() const
bool
HdxTaskController::_ColorizeSelectionEnabled() const
{
if (_viewportAov == HdAovTokens->color) {
return true;
}
return false;
return _viewportAov == HdAovTokens->color;
}

bool
Expand All @@ -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
Expand Down

0 comments on commit fc2aa38

Please sign in to comment.