Skip to content

Commit

Permalink
Call Lazy.Value once
Browse files Browse the repository at this point in the history
  • Loading branch information
KeterSCP authored and ForNeVeR committed Jan 23, 2024
1 parent ce42bda commit 515521b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Cesium.Runtime/StdLibFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ public static int Atoi(byte* ptr)
return null;
}

if (_envVarsStorage.Value.Indices.TryGetValue(envKey, out var envValueIndex))
var storage = _envVarsStorage.Value;

if (storage.Indices.TryGetValue(envKey, out var envValueIndex))
{
return _envVarsStorage.Value.Values + envValueIndex;
return storage.Values + envValueIndex;
}

return null;
Expand Down

0 comments on commit 515521b

Please sign in to comment.