From fdccd123958043ef67562d2b8bcf6a647fe2c993 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Thu, 27 Jun 2024 17:51:19 +0200 Subject: [PATCH] Avoid passing references to temporary objects --- src/execution/window_executor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/execution/window_executor.cpp b/src/execution/window_executor.cpp index e133d6dfb293..95c37176cb26 100644 --- a/src/execution/window_executor.cpp +++ b/src/execution/window_executor.cpp @@ -155,11 +155,11 @@ struct WindowColumnIterator { return iterator(a.coll, a.pos + n); } - friend inline iterator &operator-(const iterator &a, difference_type n) { + friend inline iterator operator-(const iterator &a, difference_type n) { return iterator(a.coll, a.pos - n); } - friend inline iterator &operator+(difference_type n, const iterator &a) { + friend inline iterator operator+(difference_type n, const iterator &a) { return a + n; } friend inline difference_type operator-(const iterator &a, const iterator &b) {