From 2f093d78b52acf93f24536955e2c25f8b946fdd7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 19 Sep 2011 21:55:58 +0000 Subject: [PATCH] LineAndColumn: fix operator[+-]= --- src/line_and_column.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/line_and_column.hh b/src/line_and_column.hh index fb09223b..8c8c1603 100644 --- a/src/line_and_column.hh +++ b/src/line_and_column.hh @@ -22,7 +22,7 @@ struct LineAndColumn { line += other.line; column += other.column; - return *this; + return *static_cast(this); } EffectiveType operator-(const EffectiveType& other) const @@ -34,7 +34,7 @@ struct LineAndColumn { line += other.line; column += other.column; - return *this; + return *static_cast(this); } };