Skip to content
Snippets Groups Projects
Commit 2fb954ad authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

destroyData() is not needed

parent 0407afae
No related branches found
No related tags found
No related merge requests found
...@@ -81,7 +81,6 @@ std::unique_ptr<Action> ActionRegister::create(const ActionOptions&ao) { ...@@ -81,7 +81,6 @@ std::unique_ptr<Action> ActionRegister::create(const ActionOptions&ao) {
Keywords keys; mk[ao.line[0]](keys); Keywords keys; mk[ao.line[0]](keys);
ActionOptions nao( ao,keys ); ActionOptions nao( ao,keys );
action=m[ao.line[0]](nao); action=m[ao.line[0]](nao);
keys.destroyData();
} }
return action; return action;
} }
...@@ -94,7 +93,6 @@ bool ActionRegister::printManual( const std::string& action, const bool& vimout ...@@ -94,7 +93,6 @@ bool ActionRegister::printManual( const std::string& action, const bool& vimout
} else { } else {
keys.print_html(); keys.print_html();
} }
keys.destroyData();
return true; return true;
} else { } else {
return false; return false;
...@@ -104,7 +102,7 @@ bool ActionRegister::printManual( const std::string& action, const bool& vimout ...@@ -104,7 +102,7 @@ bool ActionRegister::printManual( const std::string& action, const bool& vimout
bool ActionRegister::printTemplate( const std::string& action, bool include_optional ) { bool ActionRegister::printTemplate( const std::string& action, bool include_optional ) {
if( check(action) ) { if( check(action) ) {
Keywords keys; mk[action](keys); Keywords keys; mk[action](keys);
keys.print_template(action, include_optional); keys.destroyData(); keys.print_template(action, include_optional);
return true; return true;
} else { } else {
return false; return false;
......
...@@ -146,7 +146,8 @@ public: ...@@ -146,7 +146,8 @@ public:
std::map<std::string,std::string>& docs, std::map<std::string,bool>& bools, std::map<std::string,std::string>& nums, std::map<std::string,std::string>& docs, std::map<std::string,bool>& bools, std::map<std::string,std::string>& nums,
std::map<std::string,std::string>& atags, std::vector<std::string>& cnam, std::map<std::string,std::string>& ck, std::map<std::string,std::string>& atags, std::vector<std::string>& cnam, std::map<std::string,std::string>& ck,
std::map<std::string,std::string>& cd ) const ; std::map<std::string,std::string>& cd ) const ;
/// Clear everything from the keywords object /// Clear everything from the keywords object.
/// Not actually needed if your Keywords object is going out of scope.
void destroyData(); void destroyData();
/// Set the text that introduces how the components for this action are introduced /// Set the text that introduces how the components for this action are introduced
void setComponentsIntroduction( const std::string& instr ); void setComponentsIntroduction( const std::string& instr );
......
...@@ -68,7 +68,6 @@ Vessel* VesselRegister::create(std::string keyword, const VesselOptions&da) { ...@@ -68,7 +68,6 @@ Vessel* VesselRegister::create(std::string keyword, const VesselOptions&da) {
Keywords keys; mk[keyword](keys); Keywords keys; mk[keyword](keys);
VesselOptions nda( da,keys ); VesselOptions nda( da,keys );
df=m[keyword](nda); df=m[keyword](nda);
keys.destroyData();
} }
else df=NULL; else df=NULL;
return df; return df;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment