mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-25 15:35:48 +00:00
refactor: unglob std::wstring
This commit is contained in:
@@ -41,7 +41,7 @@ PlayerUID::PlayerUID(SceUserServiceUserId userID, SceNpOnlineId& onlineID, bool
|
||||
setOnlineID(onlineID, bSignedInPSN);
|
||||
}
|
||||
|
||||
PlayerUID::PlayerUID(wstring fromString)
|
||||
PlayerUID::PlayerUID(std::wstring fromString)
|
||||
{
|
||||
// create for the format P_5e7ff8372ea9_00000004_Mark_4J
|
||||
|
||||
@@ -53,14 +53,14 @@ PlayerUID::PlayerUID(wstring fromString)
|
||||
// parse the mac address next
|
||||
for(int i=0;i<6;i++)
|
||||
{
|
||||
wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
std::wstring macDigit = fromString.substr(2+(i*2),2);
|
||||
m_macAddress[i] = _fromHEXString<int>(macDigit);
|
||||
}
|
||||
|
||||
int userIdLen = 0;
|
||||
|
||||
// parse the userID
|
||||
wstring userIDDigits = L"";
|
||||
std::wstring userIDDigits = L"";
|
||||
|
||||
while(fromString.at(15 + userIdLen) != L'_')
|
||||
{
|
||||
@@ -71,7 +71,7 @@ PlayerUID::PlayerUID(wstring fromString)
|
||||
m_userID = _fromString<int>(userIDDigits);
|
||||
|
||||
// finally, the onlineID, if there is one
|
||||
wstring onlineID = fromString.substr(15 + userIdLen + 1);
|
||||
std::wstring onlineID = fromString.substr(15 + userIdLen + 1);
|
||||
if(onlineID.size() > 0)
|
||||
{
|
||||
wcstombs(m_onlineID, onlineID.c_str(), 16);
|
||||
|
||||
Reference in New Issue
Block a user