From be0e84e3f69e41860b3791617310e5573eec7938 Mon Sep 17 00:00:00 2001 From: Mariusz Glebocki Date: Fri, 5 Nov 2021 17:06:19 +0100 Subject: [PATCH] Fix LayoutFunctionIterator's increment and decrement operators --- common/formatting/layout_optimizer_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/formatting/layout_optimizer_internal.h b/common/formatting/layout_optimizer_internal.h index 08c93dd30..f7969dd84 100644 --- a/common/formatting/layout_optimizer_internal.h +++ b/common/formatting/layout_optimizer_internal.h @@ -369,9 +369,9 @@ class LayoutFunctionIterator { return *this; } - iterator operator++() { return *this += 1; } + iterator& operator++() { return *this += 1; } - iterator operator--() { return *this -= 1; } + iterator& operator--() { return *this -= 1; } iterator operator++(int) { auto tmp = *this;