diff options
author | gatecat <gatecat@ds0.me> | 2022-03-16 07:02:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 07:02:35 +0000 |
commit | 74783c0c0951b84e22d6d9e1b578694e77d7cfb4 (patch) | |
tree | ca33aa6f4de04f5963d5a59592e75c69b3898022 /common/command.cc | |
parent | 2df9d3537bb4836096e157c81de20d4fa937db9a (diff) | |
parent | e3b9c971f926ddf05f39eac0e37dd054ffdcdf28 (diff) | |
download | nextpnr-74783c0c0951b84e22d6d9e1b578694e77d7cfb4.tar.gz nextpnr-74783c0c0951b84e22d6d9e1b578694e77d7cfb4.tar.bz2 nextpnr-74783c0c0951b84e22d6d9e1b578694e77d7cfb4.zip |
Merge pull request #949 from yrabbit/thousands
BUGFIX: disable the thousands separator
Diffstat (limited to 'common/command.cc')
-rw-r--r-- | common/command.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/command.cc b/common/command.cc index 0de9ccc4..00f900b3 100644 --- a/common/command.cc +++ b/common/command.cc @@ -45,10 +45,17 @@ NEXTPNR_NAMESPACE_BEGIN +struct no_separator : std::numpunct<char> +{ + protected: + virtual string_type do_grouping() const { return "\000"; } // groups of 0 (disable) +}; + CommandHandler::CommandHandler(int argc, char **argv) : argc(argc), argv(argv) { try { - std::locale::global(std::locale("")); + std::locale loc(""); + std::locale::global(std::locale(loc, new no_separator())); } catch (const std::runtime_error &e) { // the locale is broken in this system, so leave it as it is } |