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.
This commit is contained in:
Brecht Van Lommel 2022-05-18 18:12:53 +02:00
parent 14a893f20e
commit 214e61fc2c
1 changed files with 4 additions and 2 deletions

View File

@ -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