Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and passing lengths around.
This commit is contained in:
@@ -301,7 +301,7 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const
|
||||
*/
|
||||
char *CrashLog::LogGamelog(char *buffer, const char *last) const
|
||||
{
|
||||
GamelogPrint([&buffer, last](const char *s) {
|
||||
_gamelog.Print([&buffer, last](const char *s) {
|
||||
buffer += seprintf(buffer, last, "%s\n", s);
|
||||
});
|
||||
return buffer + seprintf(buffer, last, "\n");
|
||||
@@ -423,7 +423,7 @@ bool CrashLog::WriteSavegame(char *filename, const char *filename_last) const
|
||||
if (!Map::IsInitialized()) return false;
|
||||
|
||||
try {
|
||||
GamelogEmergency();
|
||||
_gamelog.Emergency();
|
||||
|
||||
this->CreateFileName(filename, filename_last, ".sav");
|
||||
|
||||
|
Reference in New Issue
Block a user