Change global to local static const
To avoid polluting the global namespace without using a namespace.
This commit is contained in:
parent
41a00d9279
commit
6699091f7b
1 changed files with 2 additions and 2 deletions
|
@ -12,8 +12,6 @@ using std::vector;
|
||||||
|
|
||||||
using SCXCoreLib::Utf8ToUtf16le;
|
using SCXCoreLib::Utf8ToUtf16le;
|
||||||
|
|
||||||
const string utf8 = "UTF-8";
|
|
||||||
|
|
||||||
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724432(v=vs.85).aspx
|
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724432(v=vs.85).aspx
|
||||||
// Sets errno to:
|
// Sets errno to:
|
||||||
// ERROR_INVALID_PARAMETER - parameter is not valid
|
// ERROR_INVALID_PARAMETER - parameter is not valid
|
||||||
|
@ -31,6 +29,8 @@ const string utf8 = "UTF-8";
|
||||||
// 0 - failed
|
// 0 - failed
|
||||||
BOOL GetUserName(WCHAR_T *lpBuffer, LPDWORD lpnSize)
|
BOOL GetUserName(WCHAR_T *lpBuffer, LPDWORD lpnSize)
|
||||||
{
|
{
|
||||||
|
static const std::string utf8 = "UTF-8";
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|
Loading…
Reference in a new issue