MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / Snapshot_SetFilename

Function Snapshot_SetFilename

source/SaveState.cpp:137–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void Snapshot_SetFilename(const std::string& filename, const std::string& path/*=""*/)
138{
139 if (path.empty())
140 return Snapshot_SetPathname(filename);
141
142 _ASSERT(filename.find(PATH_SEPARATOR) == std::string::npos); // since we have a path, then filename mustn't contain a path too!
143
144 // Ensure path is suffixed with '\' before adding filename
145 std::string pathname = path;
146 if (*pathname.rbegin() != PATH_SEPARATOR)
147 pathname += PATH_SEPARATOR;
148
149 Snapshot_SetPathname(pathname+filename);
150}
151
152const std::string& Snapshot_GetFilename(void)
153{

Callers 4

Snapshot_UpdatePathFunction · 0.85
LoadConfigurationFunction · 0.85
RepeatInitializationFunction · 0.85
SaveStateUpdateMethod · 0.85

Calls 1

Snapshot_SetPathnameFunction · 0.85

Tested by

no test coverage detected