aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/agi.cpp
diff options
context:
space:
mode:
authorColin Snover2017-12-06 16:23:48 -0600
committerEugene Sandulenko2018-08-18 16:30:05 +0200
commit0851a30769c6307796d6866da073632c83d61185 (patch)
tree0d58a312ac337d5fbf5a70c51758ead2de7f8189 /engines/agi/agi.cpp
parent4db0f20f4797ae909edb785e9a8b03c095386feb (diff)
downloadscummvm-rg350-0851a30769c6307796d6866da073632c83d61185.tar.gz
scummvm-rg350-0851a30769c6307796d6866da073632c83d61185.tar.bz2
scummvm-rg350-0851a30769c6307796d6866da073632c83d61185.zip
AGI: Replace use of strdup with Common::String
It was also necessary to make sure that the Common::String objects were initialised correctly by switching to use a C++ container for engine objects instead of calloc, since they were no longer C-compatible PODs.
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r--engines/agi/agi.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 55872940f5..3f98a1d4be 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -214,7 +214,7 @@ int AgiEngine::agiDeinit() {
agiUnloadResources(); // unload resources in memory
_loader->unloadResource(RESOURCETYPE_LOGIC, 0);
ec = _loader->deinit();
- unloadObjects();
+ _objects.clear();
_words->unloadDictionary();
clearImageStack();
@@ -386,8 +386,6 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
memset(&_stringdata, 0, sizeof(struct StringData));
- _objects = NULL;
-
_restartGame = false;
_firstSlot = 0;