From 79c19c6a1c400b28f27ca6f44dd11e07ac43ec85 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 15 May 2021 22:18:00 +0300 Subject: switch from Boost.Nowide to winapi-utf8 --- utils/command_line.hpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'utils/command_line.hpp') diff --git a/utils/command_line.hpp b/utils/command_line.hpp index 9fe6b98..d1f6e2e 100644 --- a/utils/command_line.hpp +++ b/utils/command_line.hpp @@ -6,9 +6,6 @@ #pragma once #include -#include -#include -#include #include #include @@ -16,23 +13,9 @@ #include #include -class Args { -public: - Args(int argc, char** argv) : argc{argc}, argv{argv}, impl{this->argc, this->argv} { - boost::nowide::nowide_filesystem(); - } - - int argc; - char** argv; - -private: - const boost::nowide::args impl; -}; - class SettingsParser { public: - explicit SettingsParser(int argc, char** argv) - : args{argc, argv}, prog_name{extract_filename(args.argv[0])} { + explicit SettingsParser(int, char** argv) : prog_name{extract_filename(argv[0])} { visible.add_options()("help,h", "show this message and exit"); } @@ -57,11 +40,11 @@ public: bool exit_with_usage = false; - void usage() const { boost::nowide::cout << *this; } + void usage() const { std::cout << *this; } void usage_error(const std::exception& e) const { - boost::nowide::cerr << "usage error: " << e.what() << '\n'; - boost::nowide::cerr << *this; + std::cerr << "usage error: " << e.what() << '\n'; + std::cerr << *this; } protected: @@ -74,7 +57,6 @@ private: return boost::filesystem::path{path}.filename().string(); } - const Args args; const std::string prog_name; friend std::ostream& operator<<(std::ostream& os, const SettingsParser& parser) { -- cgit v1.3