MCPcopy Create free account
hub / github.com/DFHack/dfhack / try_get_locale

Function try_get_locale

library/MiscUtils.cpp:79–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79static std::locale * try_get_locale(const char * name) {
80 try {
81 return new std::locale(name);
82 } catch (std::exception &e) {
83 std::cerr << e.what() << std::endl;
84 }
85 return nullptr;
86}
87
88static const std::locale * english_loc = try_get_locale("en_US.UTF-8");
89static const std::locale * system_loc = try_get_locale("");

Callers 1

MiscUtils.cppFile · 0.85

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected