From 63f89cb4336a7232de84a6c0999833267d732175 Mon Sep 17 00:00:00 2001 From: "Mario J. Rugiero" Date: Sat, 20 Dec 2014 00:50:04 -0300 Subject: Pass pre_command to CommandDialog as const reference to avoid unnecessary copying. --- src/CommandDialog.cc | 2 +- src/CommandDialog.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CommandDialog.cc b/src/CommandDialog.cc index 023c22f..e777390 100644 --- a/src/CommandDialog.cc +++ b/src/CommandDialog.cc @@ -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) { } diff --git a/src/CommandDialog.hh b/src/CommandDialog.hh index 0e12ce3..a976bc4 100644 --- a/src/CommandDialog.hh +++ b/src/CommandDialog.hh @@ -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. -- cgit v0.11.2