Skip to content

Commit 2b34266

Browse files
committed
updates
1 parent 783ba0f commit 2b34266

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

source/code/programs/repo_tools/header_remover/program_options/program_options.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ boost::program_options::options_description Program_Options::Get_Options_Descrip
4242
("dir",value<std::string>(),"the dir to remove headers from")
4343
("target",value<std::string>(),"target to check with")
4444
("commands",value<std::vector<std::string>>(),"commands to check with")
45+
("start-at",value<int>(),"where to start in the file iteration")
4546

4647
//+----------------------------------------------------------+
4748
//| Obligatory |
@@ -136,6 +137,15 @@ std::string Program_Options::Dir() const{
136137
return data;
137138
}
138139

140+
int Program_Options::Start_At() const{
141+
int data = 0;
142+
if (vm.count("start-at")){
143+
data = vm["start-at"].as<std::string>();
144+
}
145+
146+
return data;
147+
}
148+
139149
std::vector<std::string> Program_Options::Commands() const{
140150
std::vector<std::string> data;
141151
if (vm.count("commands")){

source/code/programs/repo_tools/header_remover/program_options/program_options.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Program_Options {
2222
std::string Dir() const;
2323
std::string Target() const;
2424
std::vector<std::string> Commands() const;
25+
int Start_At() const;
2526

2627

2728
std::string Get_Help_Message();

source/code/programs/repo_tools/header_remover/task_executer.hcp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class
3434
//get all the files to prune
3535
auto files = Get_All_Files_To_Prune(options);
3636
std::cout << "Files to prune: " << files.size();
37-
for (size_t i = 0; i < files.size(); ++i){
37+
for (size_t i = options.Start_At(); i < files.size(); ++i){
3838
std::cout << "[ " << i+1 << " / " << files.size() << " ]" << std::endl;
3939
Prune_File(files[i],options);
4040
}

0 commit comments

Comments
 (0)