From 9da955e3ff4478393d30c967e4da68f6837ef51e Mon Sep 17 00:00:00 2001 From: Mark Meredith Date: Thu, 9 Apr 2020 21:14:43 -0400 Subject: [PATCH] Cleanup warnings --- src/inputs.hpp | 2 +- src/inputs_file.cpp | 4 ++-- src/main.cpp | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/inputs.hpp b/src/inputs.hpp index cffd5e4..446aff7 100644 --- a/src/inputs.hpp +++ b/src/inputs.hpp @@ -26,7 +26,7 @@ struct GeometryAxis { bool periodic; }; struct GeometrySettings { - std::tuple axes; + std::array axes; }; struct SolverSettings { GeometrySettings geometry; diff --git a/src/inputs_file.cpp b/src/inputs_file.cpp index dcc9cea..8e59745 100644 --- a/src/inputs_file.cpp +++ b/src/inputs_file.cpp @@ -48,7 +48,7 @@ solver_settings::SolverSettings InputsFile::load() { return solver_settings::SolverSettings(); } return maybe_solversettings.value(); -}; +} void InputsFile::save(solver_settings::SolverSettings settings) { @@ -66,6 +66,6 @@ void InputsFile::save(solver_settings::SolverSettings settings) { << zz.high; ; out.close(); -}; +} } // namespace inputs_file diff --git a/src/main.cpp b/src/main.cpp index b4f7920..10f9353 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,10 @@ std::string read_file(std::string inputs_file) { } int main(int argc, char *argv[]) { + if (argc<2) { + std::cout << "Usage: mfix-parser "; + return -1; + } std::string fname(argv[1]); auto inputs_str = read_file(fname); auto maybe_success = parser::parse_inputs(inputs_str); -- GitLab