Skip to content

Commit 40615a6

Browse files
committed
fix: cannot bind non-const lvalue reference of type A to an rvalue of type B
1 parent 52eef30 commit 40615a6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

indra/newview/llterrainpaintmap.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,13 +815,13 @@ LLTerrainPaintQueue LLTerrainPaintMap::convertBrushQueueToPaintRGB(const LLViewe
815815
}
816816

817817
template<typename T>
818-
LLTerrainQueue<T>::LLTerrainQueue(LLTerrainQueue<T>& other)
818+
LLTerrainQueue<T>::LLTerrainQueue(const LLTerrainQueue<T>& other)
819819
{
820820
*this = other;
821821
}
822822

823823
template<typename T>
824-
LLTerrainQueue<T>& LLTerrainQueue<T>::operator=(LLTerrainQueue<T>& other)
824+
LLTerrainQueue<T>& LLTerrainQueue<T>::operator=(const LLTerrainQueue<T>& other)
825825
{
826826
mList = other.mList;
827827
return *this;
@@ -890,14 +890,14 @@ LLTerrainPaintQueue::LLTerrainPaintQueue(U8 components)
890890
llassert(mComponents == LLTerrainPaint::RGB || mComponents == LLTerrainPaint::RGBA);
891891
}
892892

893-
LLTerrainPaintQueue::LLTerrainPaintQueue(LLTerrainPaintQueue& other)
893+
LLTerrainPaintQueue::LLTerrainPaintQueue(const LLTerrainPaintQueue& other)
894894
: LLTerrainQueue<LLTerrainPaint>(other)
895895
, mComponents(other.mComponents)
896896
{
897897
llassert(mComponents == LLTerrainPaint::RGB || mComponents == LLTerrainPaint::RGBA);
898898
}
899899

900-
LLTerrainPaintQueue& LLTerrainPaintQueue::operator=(LLTerrainPaintQueue& other)
900+
LLTerrainPaintQueue& LLTerrainPaintQueue::operator=(const LLTerrainPaintQueue& other)
901901
{
902902
LLTerrainQueue<LLTerrainPaint>::operator=(other);
903903
mComponents = other.mComponents;

indra/newview/llterrainpaintmap.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class LLTerrainQueue
6565
{
6666
public:
6767
LLTerrainQueue() = default;
68-
LLTerrainQueue(LLTerrainQueue<T>& other);
69-
LLTerrainQueue& operator=(LLTerrainQueue<T>& other);
68+
LLTerrainQueue(const LLTerrainQueue<T>& other);
69+
LLTerrainQueue& operator=(const LLTerrainQueue<T>& other);
7070

7171
bool enqueue(std::shared_ptr<T>& t, bool dry_run = false);
7272
size_t size() const;
@@ -113,8 +113,8 @@ class LLTerrainPaintQueue : public LLTerrainQueue<LLTerrainPaint>
113113
LLTerrainPaintQueue() = delete;
114114
// components determines what type of LLTerrainPaint is allowed. Must be 3 (RGB) or 4 (RGBA)
115115
LLTerrainPaintQueue(U8 components);
116-
LLTerrainPaintQueue(LLTerrainPaintQueue& other);
117-
LLTerrainPaintQueue& operator=(LLTerrainPaintQueue& other);
116+
LLTerrainPaintQueue(const LLTerrainPaintQueue& other);
117+
LLTerrainPaintQueue& operator=(const LLTerrainPaintQueue& other);
118118

119119
bool enqueue(LLTerrainPaint::ptr_t& paint, bool dry_run = false);
120120
bool enqueue(LLTerrainPaintQueue& queue);

0 commit comments

Comments
 (0)