Pass pre_command to CommandDialog as const reference to avoid unnecessary copying.

This commit is contained in:
Mario J. Rugiero 2014-12-20 00:50:04 -03:00 committed by Mathias Gumz
parent 79a358346a
commit 63f89cb433
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ using std::less;
using std::out_of_range;
CommandDialog::CommandDialog(BScreen &screen, const string &title,
const string precommand) :
const string &precommand) :
TextDialog(screen, title),
m_precommand(precommand) { }

View file

@ -35,7 +35,7 @@ class Command;
class CommandDialog: public TextDialog {
public:
CommandDialog(BScreen &screen, const std::string &title,
const std::string pre_command = "");
const std::string &pre_command = "");
/**
* Sets the command to be executed after the command is done.