Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Try fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gashmob committed Jul 19, 2023
1 parent 667186c commit 2d4ecc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/lib/utils/OptionsParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@
namespace filc::utils {
OptionsParser::OptionsParser()
: _options("filc", "Fil compiler\nVersion: " + FILC_VERSION_STRING + "\nLicense: " + FILC_LICENSE),
_verbose(0),
_debug(false), _out("a.out") {
_verbose(0), _debug(false), _out("a.out") {
_options.custom_help("[options...]");
_options.positional_help("<source files>");
_options.add_options()("f,filenames", "Filenames", cxxopts::value<std::vector<std::string>>());
_options.add_options()("h,help", "Display help message");
_options.add_options()("v,version", "Display version of compiler");
_options.add_options()("verbose", "Verbose level (0-5)",
cxxopts::value<uint>()->default_value("0")->implicit_value("1"));
cxxopts::value<unsigned int>()->default_value("0")->implicit_value("1"));
_options.add_options()("d,debug", "Compile with debug information");
_options.add_options()("o,out", "Executable output filename",
cxxopts::value<std::string>()->default_value("a.out"));
Expand Down Expand Up @@ -82,7 +81,7 @@ namespace filc::utils {
return false;
}
}
auto verbose = result["verbose"].as<uint>();
auto verbose = result["verbose"].as<unsigned int>();
const auto MAX_VERBOSE = 5;
_verbose = verbose > MAX_VERBOSE ? MAX_VERBOSE : verbose;
_debug = result.count("debug") != 0;
Expand Down Expand Up @@ -124,7 +123,7 @@ namespace filc::utils {
return _filenames;
}

auto OptionsParser::getVerbose() const -> uint {
auto OptionsParser::getVerbose() const -> unsigned int {
return _verbose;
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/OptionsParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace filc::utils {

auto getFilenames() const -> const std::vector<std::string> &;

auto getVerbose() const -> uint;
auto getVerbose() const -> unsigned int;

auto isDebug() const -> bool;

Expand All @@ -49,7 +49,7 @@ namespace filc::utils {
private:
cxxopts::Options _options;
std::vector<std::string> _filenames;
uint _verbose;
unsigned int _verbose;
bool _debug;
std::string _out;

Expand Down

0 comments on commit 2d4ecc8

Please sign in to comment.