2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 02:27:42 +00:00

RetroDataSpec: Use override where applicable

Continues the override modernizations, applying the keyword where
applicable to the RetroDataSpec target.
This commit is contained in:
Lioncash
2019-08-09 22:32:48 -04:00
parent 1e625e0995
commit a5a2516138
101 changed files with 1230 additions and 1150 deletions

View File

@@ -14,14 +14,14 @@ struct STRG : ISTRG {
std::unordered_map<DNAFourCC, std::vector<std::string>*> langMap;
std::map<std::string, int32_t> names;
int32_t lookupIdx(std::string_view name) const {
int32_t lookupIdx(std::string_view name) const override {
auto search = names.find(name.data());
if (search == names.end())
return -1;
return search->second;
}
size_t count() const {
size_t count() const override {
size_t retval = 0;
for (const auto& item : langs) {
size_t sz = item.second.size();
@@ -30,19 +30,19 @@ struct STRG : ISTRG {
}
return retval;
}
std::string getUTF8(const FourCC& lang, size_t idx) const {
std::string getUTF8(const FourCC& lang, size_t idx) const override {
auto search = langMap.find(lang);
if (search != langMap.end())
return search->second->at(idx);
return std::string();
}
std::u16string getUTF16(const FourCC& lang, size_t idx) const {
std::u16string getUTF16(const FourCC& lang, size_t idx) const override {
auto search = langMap.find(lang);
if (search != langMap.end())
return hecl::UTF8ToChar16(search->second->at(idx));
return std::u16string();
}
hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const {
hecl::SystemString getSystemString(const FourCC& lang, size_t idx) const override {
auto search = langMap.find(lang);
if (search != langMap.end())
#if HECL_UCS2