diff --git a/src/headers/arguments.hpp b/src/headers/arguments.hpp index 52627c3..98e18b8 100644 --- a/src/headers/arguments.hpp +++ b/src/headers/arguments.hpp @@ -18,7 +18,7 @@ protected: return (not str.empty()) && longVersion == str && hasPrefix; } public: - bool operator ==(const string_view it) { return is(it); } + bool operator ==(const string_view& it) { return is(it); } explicit Argument(string name): longVersion(move(name)) {} }; diff --git a/src/main.cpp b/src/main.cpp index d7c63fd..3881eeb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,7 +12,6 @@ using namespace std; int main(int argc, char* argv[]) { if ((argc == 2) && (((string) argv[1]) == "--version")) { cout << Yerbacon::getVersion() << endl; exit(EXIT_SUCCESS); } string target = ".lua"; - string_view currentArg; bool printResult = false; bool parallel = false; @@ -20,7 +19,7 @@ int main(int argc, char* argv[]) { vector files; for (signed int i = 0; i < argc; ++i) { - currentArg = static_cast(argv[i]); + const string_view currentArg (argv[i]); if (currentArg == ArgumentShort("printresult")) printResult = true; else if (currentArg == ArgumentAssignable("target")) { target.clear();