Commit b1f79462 authored by nanahira's avatar nanahira

Merge branch 'server_mc' of ../versions/ygopro-dynamic into server

parents 4700ce30 43459c83
No preview for this file type
...@@ -82,11 +82,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) { ...@@ -82,11 +82,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
cd.race = sqlite3_column_int(pStmt, 8); cd.race = sqlite3_column_int(pStmt, 8);
cd.attribute = sqlite3_column_int(pStmt, 9); cd.attribute = sqlite3_column_int(pStmt, 9);
cd.category = sqlite3_column_int(pStmt, 10); cd.category = sqlite3_column_int(pStmt, 10);
auto it = _datas.find(cd.code); _datas[cd.code] = cd;
if(it != _datas.end())
it->second = cd;
else
_datas.insert(std::make_pair(cd.code, cd));
#ifndef YGOPRO_SERVER_MODE #ifndef YGOPRO_SERVER_MODE
if(const char* text = (const char*)sqlite3_column_text(pStmt, 12)) { if(const char* text = (const char*)sqlite3_column_text(pStmt, 12)) {
BufferIO::DecodeUTF8(text, strBuffer); BufferIO::DecodeUTF8(text, strBuffer);
...@@ -102,7 +98,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) { ...@@ -102,7 +98,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
cs.desc[i] = strBuffer; cs.desc[i] = strBuffer;
} }
} }
_strings.emplace(cd.code, cs); _strings[cd.code] = cs;
#endif //YGOPRO_SERVER_MODE #endif //YGOPRO_SERVER_MODE
} }
} while(step != SQLITE_DONE); } while(step != SQLITE_DONE);
......
Subproject commit 4c3882d7a81456002fdf358185d52ce8d108bfa0 Subproject commit 301511f52a793f9a940dc352495b62d66454314d
Subproject commit d9511ded079ecfc3a3024b405e51b7ab356493f7 Subproject commit 3c92734b2fd41ea2641c94e1447f32d7ae96c1e5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment