Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-05-18 19:12:53 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-05-18 19:54:57 +0300
commit214e61fc2ca17affc971d7f7838a748ea8e93b4a (patch)
tree75e391cd8b2eb87593e33b3580bed385d38f000b /intern/cycles/graph
parent14a893f20ea3b0bb6b2ff33c2245b3c78ee407b3 (diff)
Cleanup: fix Cycles asan warning
Not sure why constructing a ustring inside [] is causing issues here, but it's slightly more efficient to construct it once anyway.
Diffstat (limited to 'intern/cycles/graph')
-rw-r--r--intern/cycles/graph/node_enum.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/graph/node_enum.h b/intern/cycles/graph/node_enum.h
index b3a55efb327..6c8bfed7ec8 100644
--- a/intern/cycles/graph/node_enum.h
+++ b/intern/cycles/graph/node_enum.h
@@ -19,8 +19,10 @@ struct NodeEnum {
}
void insert(const char *x, int y)
{
- left[ustring(x)] = y;
- right[y] = ustring(x);
+ ustring ustr_x(x);
+
+ left[ustr_x] = y;
+ right[y] = ustr_x;
}
bool exists(ustring x) const