Return a const reference from GetSelectedSet rather than copying it on every call

Originally committed to SVN as r5457.
This commit is contained in:
Thomas Goyne 2011-07-15 04:05:09 +00:00
parent 2eb4c856e8
commit 1d51dd20d2
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ public:
virtual AssDialogue * GetActiveLine() const { return active_line; }
virtual void SetSelectedSet(const Selection &new_selection);
virtual void GetSelectedSet(Selection &res) const { res = selection; }
virtual Selection GetSelectedSet() const { return selection; }
virtual Selection const& GetSelectedSet() const { return selection; }
virtual void NextLine();
virtual void PrevLine();

View File

@ -127,7 +127,7 @@ public:
/// @brief Obtain the selected set
/// @return The selected set
virtual Selection GetSelectedSet() const = 0;
virtual Selection const& GetSelectedSet() const = 0;
/// @brief Change the active line to the next in sequence
///