aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhnenko Sasha <78651190+4JustMe4@users.noreply.github.com>2024-02-09 19:01:12 +0300
committerGitHub <noreply@github.com>2024-02-09 17:01:12 +0100
commit0eaa5f79df5eb0b368f46d11b7c7c844b396a4e4 (patch)
tree9c76f9d63784f17e761f0d0e6ac70ece0455072d
parent449285f5cf1b4b145fba1237bb7bc5170cc31db9 (diff)
downloadydb-0eaa5f79df5eb0b368f46d11b7c7c844b396a4e4.tar.gz
Allow arithmetic operations and operator* for const iterators (#1663)
* Allow operations for const iterators * fix typos
-rw-r--r--ydb/library/yql/minikql/comp_nodes/mkql_sort.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ydb/library/yql/minikql/comp_nodes/mkql_sort.cpp b/ydb/library/yql/minikql/comp_nodes/mkql_sort.cpp
index fb6ce1ff11..061a3e96cd 100644
--- a/ydb/library/yql/minikql/comp_nodes/mkql_sort.cpp
+++ b/ydb/library/yql/minikql/comp_nodes/mkql_sort.cpp
@@ -100,7 +100,7 @@ public:
TGatherIterator(const TGatherIterator&) = default;
TGatherIterator& operator=(const TGatherIterator&) = default;
- TGatherIteratorRef operator*() {
+ TGatherIteratorRef operator*() const& {
return TGatherIteratorRef(*First, *Second);
}
@@ -142,18 +142,18 @@ public:
return *this;
}
- ptrdiff_t operator - (TGatherIterator& rhs) {
+ ptrdiff_t operator - (TGatherIterator& rhs) const& {
return First - rhs.First;
}
- TGatherIterator operator + (ptrdiff_t n) {
+ TGatherIterator operator + (ptrdiff_t n) const& {
TGatherIterator tmp(*this);
tmp.First += n;
tmp.Second += n;
return tmp;
}
- TGatherIterator operator - (ptrdiff_t n) {
+ TGatherIterator operator - (ptrdiff_t n) const& {
TGatherIterator tmp(*this);
tmp.First -= n;
tmp.Second -= n;
@@ -168,19 +168,19 @@ public:
return First != rhs.First;
}
- bool operator<(TGatherIterator& rhs) {
+ bool operator<(TGatherIterator& rhs) const& {
return First < rhs.First;
}
- bool operator<=(TGatherIterator& rhs) {
+ bool operator<=(TGatherIterator& rhs) const& {
return First <= rhs.First;
}
- bool operator>(TGatherIterator& rhs) {
+ bool operator>(TGatherIterator& rhs) const& {
return First > rhs.First;
}
- bool operator>=(TGatherIterator& rhs) {
+ bool operator>=(TGatherIterator& rhs) const& {
return First >= rhs.First;
}