diff --git a/src/cmake.cc b/src/cmake.cc index c89759a..8bb929f 100644 --- a/src/cmake.cc +++ b/src/cmake.cc @@ -136,7 +136,7 @@ boost::filesystem::path CMake::get_executable(const boost::filesystem::path &bui boost::system::error_code ec; auto command_file=boost::filesystem::canonical(command.file, ec); if(!ec) { - auto values=command.paramter_values("-o"); + auto values=command.parameter_values("-o"); if(!values.empty()) { size_t pos; values[0].erase(0, 11); diff --git a/src/compile_commands.cc b/src/compile_commands.cc index 8e69c3b..18846be 100644 --- a/src/compile_commands.cc +++ b/src/compile_commands.cc @@ -1,7 +1,7 @@ #include "compile_commands.h" #include -std::vector CompileCommands::Command::paramter_values(const std::string ¶mter_name) const { +std::vector CompileCommands::Command::parameter_values(const std::string ¶meter_name) const { std::vector parameter_values; bool found_argument=false; @@ -10,7 +10,7 @@ std::vector CompileCommands::Command::paramter_values(const std::st parameter_values.emplace_back(parameter); found_argument=false; } - else if(parameter==paramter_name) + else if(parameter==parameter_name) found_argument=true; } diff --git a/src/compile_commands.h b/src/compile_commands.h index f065a2a..50526eb 100644 --- a/src/compile_commands.h +++ b/src/compile_commands.h @@ -13,7 +13,7 @@ public: std::vector parameters; boost::filesystem::path file; - std::vector paramter_values(const std::string ¶meter_name) const; + std::vector parameter_values(const std::string ¶meter_name) const; }; CompileCommands(const boost::filesystem::path &build_path); diff --git a/src/meson.cc b/src/meson.cc index 7a8737a..2dbd95a 100644 --- a/src/meson.cc +++ b/src/meson.cc @@ -94,7 +94,7 @@ boost::filesystem::path Meson::get_executable(const boost::filesystem::path &bui boost::system::error_code ec; auto command_file=boost::filesystem::canonical(command.file, ec); if(!ec) { - auto values=command.paramter_values("-o"); + auto values=command.parameter_values("-o"); if(!values.empty()) { size_t pos; if((pos=values[0].find("@"))!=std::string::npos) { diff --git a/tests/compile_commands_test.cc b/tests/compile_commands_test.cc index ecfe672..5601c03 100644 --- a/tests/compile_commands_test.cc +++ b/tests/compile_commands_test.cc @@ -17,7 +17,7 @@ int main() { g_assert_cmpstr(compile_commands.commands.at(4).parameters.at(3).c_str(), ==, "te\\st"); g_assert_cmpstr(compile_commands.commands.at(4).parameters.at(4).c_str(), ==, "te\\\\st"); - auto parameter_values=compile_commands.commands.at(0).paramter_values("-o"); + auto parameter_values=compile_commands.commands.at(0).parameter_values("-o"); g_assert_cmpuint(parameter_values.size(), ==, 1); g_assert_cmpstr(parameter_values.at(0).c_str(), ==, "hello_lib@sta/main.cpp.o");