mirror of https://github.com/odrling/Aegisub
Replace rref + const ref overloads with one version taking by value
This commit is contained in:
parent
26c92453b8
commit
ab39cfe362
|
@ -954,13 +954,7 @@ void BaseGrid::SetByFrame(bool state) {
|
|||
Refresh(false);
|
||||
}
|
||||
|
||||
void BaseGrid::SetSelectedSet(const Selection &new_selection) {
|
||||
selection = new_selection;
|
||||
AnnounceSelectedSetChanged();
|
||||
Refresh(false);
|
||||
}
|
||||
|
||||
void BaseGrid::SetSelectedSet(Selection&& new_selection) {
|
||||
void BaseGrid::SetSelectedSet(Selection new_selection) {
|
||||
selection = std::move(new_selection);
|
||||
AnnounceSelectedSetChanged();
|
||||
Refresh(false);
|
||||
|
@ -979,14 +973,7 @@ void BaseGrid::SetActiveLine(AssDialogue *new_line) {
|
|||
extendRow = GetDialogueIndex(new_line);
|
||||
}
|
||||
|
||||
void BaseGrid::SetSelectionAndActive(Selection const& new_selection, AssDialogue *new_line) {
|
||||
BeginBatch();
|
||||
SetSelectedSet(new_selection);
|
||||
SetActiveLine(new_line);
|
||||
EndBatch();
|
||||
}
|
||||
|
||||
void BaseGrid::SetSelectionAndActive(Selection&& new_selection, AssDialogue *new_line) {
|
||||
void BaseGrid::SetSelectionAndActive(Selection new_selection, AssDialogue *new_line) {
|
||||
BeginBatch();
|
||||
SetSelectedSet(std::move(new_selection));
|
||||
SetActiveLine(new_line);
|
||||
|
|
|
@ -126,12 +126,10 @@ public:
|
|||
// SelectionController implementation
|
||||
void SetActiveLine(AssDialogue *new_line) override;
|
||||
AssDialogue * GetActiveLine() const override { return active_line; }
|
||||
void SetSelectedSet(Selection&& new_selection) override;
|
||||
void SetSelectedSet(const Selection &new_selection) override;
|
||||
void SetSelectedSet(Selection new_selection) override;
|
||||
void GetSelectedSet(Selection &res) const override { res = selection; }
|
||||
Selection const& GetSelectedSet() const override { return selection; }
|
||||
void SetSelectionAndActive(Selection const& new_selection, AssDialogue *new_line) override;;
|
||||
void SetSelectionAndActive(Selection&& new_selection, AssDialogue *new_line) override;;
|
||||
void SetSelectionAndActive(Selection new_selection, AssDialogue *new_line) override;;
|
||||
void NextLine() override;
|
||||
void PrevLine() override;
|
||||
|
||||
|
|
|
@ -97,8 +97,7 @@ public:
|
|||
/// If no change happens to the selected set, whether because it was refused or
|
||||
/// because the new set was identical to the old set, no change notification may
|
||||
/// be sent.
|
||||
virtual void SetSelectedSet(const Selection &new_selection) = 0;
|
||||
virtual void SetSelectedSet(Selection&& new_selection) = 0;
|
||||
virtual void SetSelectedSet(Selection new_selection) = 0;
|
||||
|
||||
/// @brief Obtain the selected set
|
||||
/// @param[out] selection Filled with the selected set on return
|
||||
|
@ -115,8 +114,7 @@ public:
|
|||
/// This sets both the active line and selected set before announcing the
|
||||
/// change to either of them, and is guaranteed to announce the active line
|
||||
/// change before the selection change.
|
||||
virtual void SetSelectionAndActive(Selection const& new_selection, ItemDataType new_line) = 0;
|
||||
virtual void SetSelectionAndActive(Selection&& new_selection, ItemDataType new_line) = 0;
|
||||
virtual void SetSelectionAndActive(Selection new_selection, ItemDataType new_line) = 0;
|
||||
|
||||
/// @brief Change the active line to the next in sequence
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue