diff options
author | Mario J. Rugiero <mrugiero@gmail.com> | 2014-12-20 03:50:04 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-05-01 08:46:20 (GMT) |
commit | 63f89cb4336a7232de84a6c0999833267d732175 (patch) | |
tree | 570bf2bcb842140125e893507f514e9dc2bcff86 | |
parent | 79a358346a650a40c0e0f0409b264bf3e3cb23a4 (diff) | |
download | fluxbox-63f89cb4336a7232de84a6c0999833267d732175.zip fluxbox-63f89cb4336a7232de84a6c0999833267d732175.tar.bz2 |
Pass pre_command to CommandDialog as const reference to avoid unnecessary copying.
-rw-r--r-- | src/CommandDialog.cc | 2 | ||||
-rw-r--r-- | 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; | |||
40 | using std::out_of_range; | 40 | using std::out_of_range; |
41 | 41 | ||
42 | CommandDialog::CommandDialog(BScreen &screen, const string &title, | 42 | CommandDialog::CommandDialog(BScreen &screen, const string &title, |
43 | const string precommand) : | 43 | const string &precommand) : |
44 | TextDialog(screen, title), | 44 | TextDialog(screen, title), |
45 | m_precommand(precommand) { } | 45 | m_precommand(precommand) { } |
46 | 46 | ||
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; | |||
35 | class CommandDialog: public TextDialog { | 35 | class CommandDialog: public TextDialog { |
36 | public: | 36 | public: |
37 | CommandDialog(BScreen &screen, const std::string &title, | 37 | CommandDialog(BScreen &screen, const std::string &title, |
38 | const std::string pre_command = ""); | 38 | const std::string &pre_command = ""); |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Sets the command to be executed after the command is done. | 41 | * Sets the command to be executed after the command is done. |