From ca6aa75bc8725e8aa6688892e8a2e66cb97d1700 Mon Sep 17 00:00:00 2001 From: Timur Doumler Date: Wed, 22 Apr 2015 16:01:01 +0100 Subject: [PATCH] now passing SparseSet as const& instead of by value in ListBox::createSnapshotOfRows/startDragAndDrop. --- modules/juce_gui_basics/widgets/juce_ListBox.cpp | 4 ++-- modules/juce_gui_basics/widgets/juce_ListBox.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 356a6be085..c90db1876e 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -886,7 +886,7 @@ void ListBox::repaintRow (const int rowNumber) noexcept repaint (getRowPosition (rowNumber, true)); } -Image ListBox::createSnapshotOfRows (SparseSet rows, int& imageX, int& imageY) +Image ListBox::createSnapshotOfRows (const SparseSet& rows, int& imageX, int& imageY) { Rectangle imageArea; const int firstRow = getRowContainingPosition (0, viewport->getY()); @@ -929,7 +929,7 @@ Image ListBox::createSnapshotOfRows (SparseSet rows, int& imageX, int& imag return snapshot; } -void ListBox::startDragAndDrop (const MouseEvent& e, SparseSet rowsToDrag, const var& dragDescription, bool allowDraggingToOtherWindows) +void ListBox::startDragAndDrop (const MouseEvent& e, const SparseSet& rowsToDrag, const var& dragDescription, bool allowDraggingToOtherWindows) { if (DragAndDropContainer* const dragContainer = DragAndDropContainer::findParentDragContainerFor (this)) { diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.h b/modules/juce_gui_basics/widgets/juce_ListBox.h index 6db2c68035..b48061f433 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.h +++ b/modules/juce_gui_basics/widgets/juce_ListBox.h @@ -530,7 +530,7 @@ public: @see Component::createComponentSnapshot */ - virtual Image createSnapshotOfRows (SparseSet rows, int& x, int& y); + virtual Image createSnapshotOfRows (const SparseSet& rows, int& x, int& y); /** Returns the viewport that this ListBox uses. @@ -561,7 +561,7 @@ public: /** @internal */ void parentHierarchyChanged() override; /** @internal */ - void startDragAndDrop (const MouseEvent&, SparseSet rowsToDrag, + void startDragAndDrop (const MouseEvent&, const SparseSet& rowsToDrag, const var& dragDescription, bool allowDraggingToOtherWindows); private: