Replace CLang file hashing with .st_mtime

Replace CLang file hashing with .st_mtime for performance.
Also, fix a problem in CLangMngr::MergeDefinitionFile.
This commit is contained in:
HttrckCldHKS
2015-02-19 21:28:45 +02:00
parent 2b9e9c79b9
commit 530d0bf570
2 changed files with 13 additions and 56 deletions

View File

@@ -11,6 +11,7 @@
#define _INCLUDE_CLANG_H
#include "sh_tinyhash.h"
#include "sm_stringhashmap.h"
#define LANG_SERVER 0
#define LANG_PLAYER -1
@@ -18,12 +19,6 @@
#define ERR_BADKEY 1 // Lang key not found
#define ERR_BADLANG 2 // Invalid lang
struct md5Pair
{
String file;
String val;
};
struct sKeyDef
{
String *definition;
@@ -118,7 +113,7 @@ private:
LangVec m_Languages;
CVector<md5Pair *> FileList;
StringHashMap<time_t> FileList;
CVector<String *> KeyList;
THash<String, keytbl_val> KeyTable;