From e8ee9feb6aaeec779566c8ad084f77cde8234566 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 14 Oct 2016 03:09:29 +0300 Subject: fix GCC errors --- src/cmd_line.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cmd_line.hpp') diff --git a/src/cmd_line.hpp b/src/cmd_line.hpp index b7e1b70..18ea496 100644 --- a/src/cmd_line.hpp +++ b/src/cmd_line.hpp @@ -31,7 +31,7 @@ public: static CommandLine build_from_main(int argc, wchar_t* argv[]) { if (argc < 1) - throw std::range_error(__FUNCTION__ ": invalid argc value"); + throw std::range_error{"invalid argc value"}; std::wstring argv0{argv[0]}; --argc; @@ -82,21 +82,21 @@ public: return safe; } - static constexpr auto sep = L' '; + static constexpr wchar_t sep() { return L' '; } std::wstring join_args() const { - return string::join(sep, escape_args()); + return string::join(sep(), escape_args()); } std::wstring join() const { if (!has_argv0()) - throw std::logic_error(__FUNCTION__ ": doesn't have executable path"); + throw std::logic_error{"argv[0] isn't defined"}; std::wostringstream oss; oss << escape_argv0(); if (has_args()) - oss << sep << string::join(sep, escape_args()); + oss << sep() << string::join(sep(), escape_args()); return oss.str(); } -- cgit v1.2.3