Skip to content

Commit

Permalink
Fix macOS clang compilation error.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppt-adsk committed Apr 3, 2024
1 parent 6b1661c commit 7f32662
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/mayaHydra/mayaPlugin/renderOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ class UsdPickHandler : public MtohRenderOverride::PickHandlerBase {
(pickedMayaPath + std::to_string(instanceNdx)) :

// Not an instance: adjust picked path for selection kind.
[&]() {
// As per https://stackoverflow.com/questions/46114214
// structured bindings cannot be captured by a lambda in C++ 17,
// so pass in pickedUsdPath as a lambda argument.
[&pickedMayaPath, &registration](const SdfPath& pickedUsdPath) {
auto snKind = GetSelectionKind();
if (snKind.IsEmpty()) {
return pickedMayaPath;
Expand All @@ -528,7 +531,7 @@ class UsdPickHandler : public MtohRenderOverride::PickHandlerBase {
const auto usdPath = prim ? prim.GetPath() : pickedUsdPath;

return usdPathToUfePath(registration, usdPath);
}();
}(pickedUsdPath);

auto si = Ufe::Hierarchy::createItem(snMayaPath);
if (!si) {
Expand Down

0 comments on commit 7f32662

Please sign in to comment.