From 7ef30c8177e14fec1930b9ff6af1e8764db8cb9c Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 5 Aug 2017 13:14:31 +0200 Subject: [PATCH] CompileCommand cleanup --- src/CompileCommand.cc | 11 +---------- src/CompileCommand.h | 3 +-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/CompileCommand.cc b/src/CompileCommand.cc index b9f3f45..659a5bc 100644 --- a/src/CompileCommand.cc +++ b/src/CompileCommand.cc @@ -2,16 +2,7 @@ #include "CompileCommands.h" #include "Utility.h" -std::string clangmm::CompileCommand::get_command() { - std::string res; - unsigned N = clang_CompileCommand_getNumArgs(cx_command); - for (unsigned i = 0; i < N; i++) { - res += to_string(clang_CompileCommand_getArg(cx_command, i)); - } - return res; -} - -std::vector clangmm::CompileCommand::get_command_as_args() { +std::vector clangmm::CompileCommand::get_arguments() { unsigned N = clang_CompileCommand_getNumArgs(cx_command); std::vector res(N); for (unsigned i = 0; i < N; i++) { diff --git a/src/CompileCommand.h b/src/CompileCommand.h index c5a26e6..f442ad0 100644 --- a/src/CompileCommand.h +++ b/src/CompileCommand.h @@ -8,8 +8,7 @@ namespace clangmm { class CompileCommand { public: CompileCommand(const CXCompileCommand& cx_command) : cx_command(cx_command) {}; - std::string get_command(); - std::vector get_command_as_args(); + std::vector get_arguments(); CXCompileCommand cx_command; };