File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ prior written authorization from the authors.
30
30
#include < iomanip>
31
31
#include < iostream>
32
32
#include < list>
33
+ #include < locale>
33
34
#include < set>
34
35
#include < shared_mutex>
35
36
#include < string>
@@ -316,10 +317,18 @@ class WASimClient::Private
316
317
#pragma endregion
317
318
#pragma region Constructor and status ----------------------------------------------
318
319
320
+ // Returns integer ID as 8 char hex string using neutral locale formatting.
321
+ static std::string makeClientName (uint32_t id) {
322
+ std::ostringstream oss;
323
+ oss.imbue (std::locale::classic ());
324
+ oss << STREAM_HEX8 (id);
325
+ return oss.str ();
326
+ }
327
+
319
328
Private (WASimClient *qptr, uint32_t clientId, const std::string &config) :
320
329
q{qptr},
321
330
clientId{clientId},
322
- clientName{( ostringstream () << STREAM_HEX8 ( clientId)). str ( )}
331
+ clientName{makeClientName ( clientId)}
323
332
{
324
333
error_code ec;
325
334
filesystem::path cwd = filesystem::current_path (ec);
@@ -1000,6 +1009,7 @@ class WASimClient::Private
1000
1009
1001
1010
// Build the RPN code string.
1002
1011
ostringstream codeStr = ostringstream ();
1012
+ codeStr.imbue (std::locale::classic ());
1003
1013
codeStr << fixed << setprecision (7 ) << value;
1004
1014
codeStr << " (>" << v.variableType << ' :' << v.variableName ;
1005
1015
if (v.variableType == ' A' && v.simVarIndex )
You can’t perform that action at this time.
0 commit comments