save object details to repository file

This commit is contained in:
Ted John committed 2016-07-08 22:58:38 +01:00
1 parent 2449b7dbf0
commit e93b2141a1
9 files changed
+64 -28

No files matched your search

+12
View File
@@ -64,6 +64,18 @@ void StringTable::Read(IStream * stream, uint8 id)
Sort();
}
const utf8 * StringTable::GetString(uint8 id)
{
for (auto &string : _strings)
{
if (string.Id == id)
{
return string.Text;
}
}
return nullptr;
}
void StringTable::Sort()
{
std::sort(_strings.begin(), _strings.end(), [](const StringTableEntry &a, const StringTableEntry &b) -> bool