Skip to content

Commit 8dc86fe

Browse files
syoyoclaude
andcommitted
Fix dangling reference warnings in scene-access.cc
Changed reference binding to value copy for token variables in GetGeomSubsets and GetGeomSubsetChildren functions. This fixes compilation errors with GCC 14 which treats dangling reference warnings (-Wdangling-reference) as errors when using -Werror. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b7f47bd commit 8dc86fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tydra/scene-access.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,7 @@ std::vector<const GeomSubset *> GetGeomSubsets(
23512351
if (familyName.valid()) {
23522352
if (pv->familyName.authored()) {
23532353
if (pv->familyName.get_value().has_value()) {
2354-
const value::token &tok = pv->familyName.get_value().value();
2354+
const value::token tok = pv->familyName.get_value().value();
23552355
if (familyName.str() == tok.str()) {
23562356
result.push_back(pv);
23572357
}
@@ -2386,7 +2386,7 @@ std::vector<const GeomSubset *> GetGeomSubsetChildren(
23862386
if (familyName.valid()) {
23872387
if (pv->familyName.authored()) {
23882388
if (pv->familyName.get_value().has_value()) {
2389-
const value::token &tok = pv->familyName.get_value().value();
2389+
const value::token tok = pv->familyName.get_value().value();
23902390
if (familyName.str() == tok.str()) {
23912391
result.push_back(pv);
23922392
}

0 commit comments

Comments
 (0)