Use length() instead of size()

To be consistent with everything else.
This commit is contained in:
Andrew Schwartzmeyer 2015-08-13 17:54:29 -07:00
parent 91345a149e
commit c6aa25acd5
No known key found for this signature in database
GPG key ID: D50036A9A84A216F

View file

@ -83,8 +83,8 @@ BOOL GetUserNameW(WCHAR_T* lpBuffer, LPDWORD lpnSize)
}
// Get username from system in a thread-safe manner
int ret = getlogin_r(&username[0], username.size());
std::string username(LOGIN_NAME_MAX, 0);
int ret = getlogin_r(&username[0], username.length());
// Map errno to Win32 Error Codes
if (ret)
{