Commit ab490a89 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro into mc

parents ce63eaa2 38e3690a
Pipeline #8449 passed with stages
in 49 minutes and 9 seconds
......@@ -62,11 +62,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
cd.race = sqlite3_column_int(pStmt, 8);
cd.attribute = sqlite3_column_int(pStmt, 9);
cd.category = sqlite3_column_int(pStmt, 10);
auto it = _datas.find(cd.code);
if(it != _datas.end())
it->second = cd;
else
_datas.insert(std::make_pair(cd.code, cd));
_datas[cd.code] = cd;
if(const char* text = (const char*)sqlite3_column_text(pStmt, 12)) {
BufferIO::DecodeUTF8(text, strBuffer);
cs.name = strBuffer;
......@@ -81,7 +77,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
cs.desc[i] = strBuffer;
}
}
_strings.emplace(cd.code, cs);
_strings[cd.code] = cs;
}
} while(step != SQLITE_DONE);
sqlite3_finalize(pStmt);
......
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