Commit efb11b26 authored by Chen Bill's avatar Chen Bill Committed by GitHub

DataManager: get string functions unsigned int (#2527)

parent de93a26d
...@@ -197,7 +197,7 @@ code_pointer DataManager::GetCodePointer(unsigned int code) const { ...@@ -197,7 +197,7 @@ code_pointer DataManager::GetCodePointer(unsigned int code) const {
string_pointer DataManager::GetStringPointer(unsigned int code) const { string_pointer DataManager::GetStringPointer(unsigned int code) const {
return _strings.find(code); return _strings.find(code);
} }
bool DataManager::GetString(int code, CardString* pStr) { bool DataManager::GetString(unsigned int code, CardString* pStr) {
auto csit = _strings.find(code); auto csit = _strings.find(code);
if(csit == _strings.end()) { if(csit == _strings.end()) {
pStr->name = unknown_string; pStr->name = unknown_string;
...@@ -207,7 +207,7 @@ bool DataManager::GetString(int code, CardString* pStr) { ...@@ -207,7 +207,7 @@ bool DataManager::GetString(int code, CardString* pStr) {
*pStr = csit->second; *pStr = csit->second;
return true; return true;
} }
const wchar_t* DataManager::GetName(int code) { const wchar_t* DataManager::GetName(unsigned int code) {
auto csit = _strings.find(code); auto csit = _strings.find(code);
if(csit == _strings.end()) if(csit == _strings.end())
return unknown_string; return unknown_string;
...@@ -215,7 +215,7 @@ const wchar_t* DataManager::GetName(int code) { ...@@ -215,7 +215,7 @@ const wchar_t* DataManager::GetName(int code) {
return csit->second.name.c_str(); return csit->second.name.c_str();
return unknown_string; return unknown_string;
} }
const wchar_t* DataManager::GetText(int code) { const wchar_t* DataManager::GetText(unsigned int code) {
auto csit = _strings.find(code); auto csit = _strings.find(code);
if(csit == _strings.end()) if(csit == _strings.end())
return unknown_string; return unknown_string;
......
...@@ -20,9 +20,9 @@ public: ...@@ -20,9 +20,9 @@ public:
bool GetData(unsigned int code, CardData* pData); bool GetData(unsigned int code, CardData* pData);
code_pointer GetCodePointer(unsigned int code) const; code_pointer GetCodePointer(unsigned int code) const;
string_pointer GetStringPointer(unsigned int code) const; string_pointer GetStringPointer(unsigned int code) const;
bool GetString(int code, CardString* pStr); bool GetString(unsigned int code, CardString* pStr);
const wchar_t* GetName(int code); const wchar_t* GetName(unsigned int code);
const wchar_t* GetText(int code); const wchar_t* GetText(unsigned int code);
const wchar_t* GetDesc(unsigned int strCode); const wchar_t* GetDesc(unsigned int strCode);
const wchar_t* GetSysString(int code); const wchar_t* GetSysString(int code);
const wchar_t* GetVictoryString(int code); const wchar_t* GetVictoryString(int code);
......
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