diff options
author | Vas Crabb <vas@vastheman.com> | 2019-11-23 11:30:07 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2019-11-23 11:30:07 +1100 |
commit | e09f2e49a63ad667513ed3800153e5f3e6722f82 (patch) | |
tree | ff91f592f1862231de15deb57fac1a3cea1ede41 /src/emu | |
parent | aea6bbe2b4c49776c86acf22a1eacbabfda0e784 (diff) |
util/options.cpp: fix locale issues and a const correctness issue
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/emuopts.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index e3de65b14bd..c42fcef8482 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -237,7 +237,7 @@ namespace { } - virtual const char *value() const override + virtual const char *value() const noexcept override { // This is returning an empty string instead of nullptr to signify that // specifying the value is a meaningful operation. The option types that @@ -287,7 +287,7 @@ namespace { } - virtual const char *value() const override + virtual const char *value() const noexcept override { const char *result = nullptr; if (m_host.specified()) @@ -298,6 +298,7 @@ namespace // happen in practice // // In reality, I want to really return std::optional<std::string> here + // FIXME: the std::string assignment can throw exceptions, and returning std::optional<std::string> also isn't safe in noexcept m_temp = m_host.specified_value(); result = m_temp.c_str(); } @@ -325,7 +326,7 @@ namespace { } - virtual const char *value() const override + virtual const char *value() const noexcept override { return m_host.value().c_str(); } |