From 8615f1bbad630602009c04a317cd83e03aaa620c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 3 Jun 2010 14:12:42 -0600 Subject: Unload loaded DBs before loading them again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This greatly simplifies handling DBs when changing states. No more need to manage unloading in Client (except when exiting). Reviewed-by: Thorbjørn Lindeijer --- src/resources/itemdb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resources/itemdb.cpp') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 4638f00e..077012c7 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -108,7 +108,7 @@ static std::string normalized(const std::string &name) void ItemDB::load() { if (mLoaded) - return; + unload(); logger->log("Initializing item database..."); -- cgit v1.2.3-70-g09d2