mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-23 02:56:50 +00:00
refactor: unglob std::wstring
This commit is contained in:
@@ -8,7 +8,7 @@ WstringLookup::WstringLookup()
|
||||
numIDs = 0;
|
||||
}
|
||||
|
||||
wstring WstringLookup::lookup(UINT id)
|
||||
std::wstring WstringLookup::lookup(UINT id)
|
||||
{
|
||||
// TODO
|
||||
//if (id > currentMaxID)
|
||||
@@ -17,12 +17,12 @@ wstring WstringLookup::lookup(UINT id)
|
||||
return int2str.at(id);
|
||||
}
|
||||
|
||||
UINT WstringLookup::lookup(wstring str)
|
||||
UINT WstringLookup::lookup(std::wstring str)
|
||||
{
|
||||
if (str2int.find(str) == str2int.end())
|
||||
{
|
||||
pair<wstring,UINT> p =
|
||||
pair<wstring,UINT>(str, numIDs);
|
||||
pair<std::wstring,UINT> p =
|
||||
pair<std::wstring,UINT>(str, numIDs);
|
||||
|
||||
str2int.insert( p );
|
||||
int2str.push_back( str );
|
||||
@@ -35,13 +35,13 @@ UINT WstringLookup::lookup(wstring str)
|
||||
}
|
||||
}
|
||||
|
||||
VOID WstringLookup::getTable(wstring **lookup, UINT *len)
|
||||
VOID WstringLookup::getTable(std::wstring **lookup, UINT *len)
|
||||
{
|
||||
// Outputs
|
||||
wstring *out_lookup; UINT out_len;
|
||||
std::wstring *out_lookup; UINT out_len;
|
||||
|
||||
// Fill lookup.
|
||||
out_lookup = new wstring[int2str.size()];
|
||||
out_lookup = new std::wstring[int2str.size()];
|
||||
for (UINT i = 0; i < numIDs; i++)
|
||||
out_lookup[i] = int2str.at(i);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user