Skip to content

Commit 15b8864

Browse files
committed
xrCore: replaced string conversion on std function
1 parent 5b5e0f3 commit 15b8864

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/xrCore/xrstring.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include <cstdio>
4+
#include <locale>
45

56
#include "_types.h"
67
#include "xrCommon/inlining_macros.h"
@@ -205,8 +206,8 @@ IC void xr_strlwr(shared_str& src)
205206
int i = 0;
206207
while(lp[i])
207208
{
208-
lp[i] = (char) toupper(lp[i]);// TODO rewrite locale-independent toupper_l()
209-
i++;
209+
lp[i] = (char) std::toupper(lp[i], std::locale());
210+
i++;
210211
}
211212
#endif
212213
src = lp;

0 commit comments

Comments
 (0)