AlexVinS 9 年之前
父节点
当前提交
cf1d5d0bc9
共有 3 个文件被更改,包括 11 次插入1 次删除
  1. 8 0
      lib/CModHandler.cpp
  2. 2 0
      lib/CModHandler.h
  3. 1 1
      lib/VCMI_Lib.cpp

+ 8 - 0
lib/CModHandler.cpp

@@ -30,6 +30,10 @@ CIdentifierStorage::CIdentifierStorage():
 {
 }
 
+CIdentifierStorage::~CIdentifierStorage()
+{
+}
+
 void CIdentifierStorage::checkIdentifier(std::string & ID)
 {
 	if (boost::algorithm::ends_with(ID, "."))
@@ -558,6 +562,10 @@ CModHandler::CModHandler()
 
 }
 
+CModHandler::~CModHandler()
+{
+}
+
 void CModHandler::loadConfigFromFile (std::string name)
 {
 	std::string paths;

+ 2 - 0
lib/CModHandler.h

@@ -69,6 +69,7 @@ class CIdentifierStorage
 	std::vector<ObjectData> getPossibleIdentifiers(const ObjectCallback & callback);
 public:
 	CIdentifierStorage();
+	virtual ~CIdentifierStorage();
 	/// request identifier for specific object name.
 	/// Function callback will be called during ID resolution phase of loading
 	void requestIdentifier(std::string scope, std::string type, std::string name, const std::function<void(si32)> & callback);
@@ -291,6 +292,7 @@ public:
 	} modules;
 
 	CModHandler();
+	virtual ~CModHandler();
 
 	std::string normalizeIdentifier(const std::string & scope, const std::string & remoteScope, const std::string & identifier) const;
 

+ 1 - 1
lib/VCMI_Lib.cpp

@@ -68,7 +68,7 @@ void LibClasses::loadFilesystem()
 	CResourceHandler::load("config/filesystem.json");
 	logGlobal->infoStream()<<"\t Data loading: "<<loadTime.getDiff();
 
-	modh = new CModHandler;
+	modh = new CModHandler();
 	logGlobal->infoStream()<<"\tMod handler: "<<loadTime.getDiff();
 
 	modh->loadMods();