Minor tweaks

This commit is contained in:
Jarryd Beck 2017-08-29 18:20:28 +10:00
parent 52e2f8b140
commit 1e51db16b5

View File

@ -242,6 +242,8 @@ namespace cxxopts
#endif #endif
namespace cxxopts namespace cxxopts
{
namespace
{ {
#ifdef _WIN32 #ifdef _WIN32
const std::string LQUOTE("\'"); const std::string LQUOTE("\'");
@ -250,6 +252,7 @@ namespace cxxopts
const std::string LQUOTE(""); const std::string LQUOTE("");
const std::string RQUOTE(""); const std::string RQUOTE("");
#endif #endif
}
class Value : public std::enable_shared_from_this<Value> class Value : public std::enable_shared_from_this<Value>
{ {
@ -354,7 +357,9 @@ namespace cxxopts
{ {
public: public:
missing_argument_exception(const std::string& option) missing_argument_exception(const std::string& option)
: OptionParseException(u8"Option " + LQUOTE + option + RQUOTE + u8" is missing an argument") : OptionParseException(
u8"Option " + LQUOTE + option + RQUOTE + u8" is missing an argument"
)
{ {
} }
}; };
@ -363,7 +368,9 @@ namespace cxxopts
{ {
public: public:
option_requires_argument_exception(const std::string& option) option_requires_argument_exception(const std::string& option)
: OptionParseException(u8"Option " + LQUOTE + option + RQUOTE + u8" requires an argument") : OptionParseException(
u8"Option " + LQUOTE + option + RQUOTE + u8" requires an argument"
)
{ {
} }
}; };
@ -377,8 +384,10 @@ namespace cxxopts
const std::string& arg const std::string& arg
) )
: OptionParseException( : OptionParseException(
u8"Option " + LQUOTE + option + RQUOTE + u8" does not take an argument, but argument" u8"Option " + LQUOTE + option + RQUOTE +
+ LQUOTE + arg + RQUOTE + " given") u8" does not take an argument, but argument" +
LQUOTE + arg + RQUOTE + " given"
)
{ {
} }
}; };
@ -410,8 +419,7 @@ namespace cxxopts
{ {
public: public:
option_required_exception(const std::string& option) option_required_exception(const std::string& option)
: OptionParseException : OptionParseException(
(
u8"Option " + LQUOTE + option + RQUOTE + u8" is required but not present" u8"Option " + LQUOTE + option + RQUOTE + u8" is required but not present"
) )
{ {