diff --git a/source/code/programs/repo_tools/header_remover/program_options/program_options.cpp b/source/code/programs/repo_tools/header_remover/program_options/program_options.cpp index 6b2ab8f5a..85253a8f7 100644 --- a/source/code/programs/repo_tools/header_remover/program_options/program_options.cpp +++ b/source/code/programs/repo_tools/header_remover/program_options/program_options.cpp @@ -42,6 +42,7 @@ boost::program_options::options_description Program_Options::Get_Options_Descrip ("dir",value(),"the dir to remove headers from") ("target",value(),"target to check with") ("commands",value>(),"commands to check with") + ("start-at",value(),"where to start in the file iteration") //+----------------------------------------------------------+ //| Obligatory | @@ -136,6 +137,15 @@ std::string Program_Options::Dir() const{ return data; } +int Program_Options::Start_At() const{ + int data = 0; + if (vm.count("start-at")){ + data = vm["start-at"].as(); + } + + return data; +} + std::vector Program_Options::Commands() const{ std::vector data; if (vm.count("commands")){ diff --git a/source/code/programs/repo_tools/header_remover/program_options/program_options.hpp b/source/code/programs/repo_tools/header_remover/program_options/program_options.hpp index ec9e877f0..88b8fc6ec 100644 --- a/source/code/programs/repo_tools/header_remover/program_options/program_options.hpp +++ b/source/code/programs/repo_tools/header_remover/program_options/program_options.hpp @@ -22,6 +22,7 @@ class Program_Options { std::string Dir() const; std::string Target() const; std::vector Commands() const; + int Start_At() const; std::string Get_Help_Message(); diff --git a/source/code/programs/repo_tools/header_remover/task_executer.hcp b/source/code/programs/repo_tools/header_remover/task_executer.hcp index 0f1032517..65de3768b 100644 --- a/source/code/programs/repo_tools/header_remover/task_executer.hcp +++ b/source/code/programs/repo_tools/header_remover/task_executer.hcp @@ -34,7 +34,7 @@ class //get all the files to prune auto files = Get_All_Files_To_Prune(options); std::cout << "Files to prune: " << files.size(); - for (size_t i = 0; i < files.size(); ++i){ + for (size_t i = options.Start_At(); i < files.size(); ++i){ std::cout << "[ " << i+1 << " / " << files.size() << " ]" << std::endl; Prune_File(files[i],options); }