Pass pointer by ref.
This was SVN commit r18366.
This commit is contained in:
parent
6e2106edd8
commit
9dc66a27d8
@ -39,7 +39,7 @@ static const int SAVED_GAME_VERSION_MINOR = 0; // increment on compatible change
|
||||
// TODO: we ought to check version numbers when loading files
|
||||
|
||||
|
||||
Status SavedGames::SavePrefix(const CStrW& prefix, const CStrW& description, CSimulation2& simulation, shared_ptr<ScriptInterface::StructuredClone> guiMetadataClone)
|
||||
Status SavedGames::SavePrefix(const CStrW& prefix, const CStrW& description, CSimulation2& simulation, const shared_ptr<ScriptInterface::StructuredClone>& guiMetadataClone)
|
||||
{
|
||||
// Determine the filename to save under
|
||||
const VfsPath basenameFormat(L"saves/" + prefix + L"-%04d");
|
||||
@ -54,7 +54,7 @@ Status SavedGames::SavePrefix(const CStrW& prefix, const CStrW& description, CSi
|
||||
return Save(filename.Filename().string(), description, simulation, guiMetadataClone);
|
||||
}
|
||||
|
||||
Status SavedGames::Save(const CStrW& name, const CStrW& description, CSimulation2& simulation, shared_ptr<ScriptInterface::StructuredClone> guiMetadataClone)
|
||||
Status SavedGames::Save(const CStrW& name, const CStrW& description, CSimulation2& simulation, const shared_ptr<ScriptInterface::StructuredClone>& guiMetadataClone)
|
||||
{
|
||||
JSContext* cx = simulation.GetScriptInterface().GetContext();
|
||||
JSAutoRequest rq(cx);
|
||||
|
@ -43,10 +43,10 @@ namespace SavedGames
|
||||
* @param name Name to save the game with
|
||||
* @param description A user-given description of the save
|
||||
* @param simulation
|
||||
* @param gui if not NULL, store some UI-related data with the saved game
|
||||
* @param guiMetadataClone if not NULL, store some UI-related data with the saved game
|
||||
* @return INFO::OK if successfully saved, else an error Status
|
||||
*/
|
||||
Status Save(const CStrW& name, const CStrW& description, CSimulation2& simulation, shared_ptr<ScriptInterface::StructuredClone> guiMetadataClone);
|
||||
Status Save(const CStrW& name, const CStrW& description, CSimulation2& simulation, const shared_ptr<ScriptInterface::StructuredClone>& guiMetadata);
|
||||
|
||||
/**
|
||||
* Create new saved game archive with given prefix and simulation data
|
||||
@ -54,10 +54,10 @@ Status Save(const CStrW& name, const CStrW& description, CSimulation2& simulatio
|
||||
* @param prefix Create new numbered file starting with this prefix
|
||||
* @param description A user-given description of the save
|
||||
* @param simulation
|
||||
* @param gui if not NULL, store some UI-related data with the saved game
|
||||
* @param guiMetadataClone if not NULL, store some UI-related data with the saved game
|
||||
* @return INFO::OK if successfully saved, else an error Status
|
||||
*/
|
||||
Status SavePrefix(const CStrW& prefix, const CStrW& description, CSimulation2& simulation, shared_ptr<ScriptInterface::StructuredClone> guiMetadataClone);
|
||||
Status SavePrefix(const CStrW& prefix, const CStrW& description, CSimulation2& simulation, const shared_ptr<ScriptInterface::StructuredClone>& guiMetadata);
|
||||
|
||||
/**
|
||||
* Load saved game archive with the given name
|
||||
|
Loading…
Reference in New Issue
Block a user