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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user