HomeWildfire Games

Don't use std::shared_ptr<ScriptContext> in the CSimulation2

Description

Don't use std::shared_ptr<ScriptContext> in the CSimulation2

Since rP27945 the CSimulation2 uses the std::shared_ptr only in the constructor and stores a ScriptContext& (inside it's members). That's a bit dangerous: A caller might think CSimulation2 takes ownership of the ScriptContext.
With this commit the caller has to pass an ScriptContext& to the constructor.

Comments By: @vladislavbelov

Differential Revision: https://code.wildfiregames.com/D5223

Event Timeline

Unknown Object (User) added a subscriber: Unknown Object (User).Apr 15 2024, 4:40 AM
This comment was removed by phabadmin.
phabadmin removed a subscriber: phabadmin.