diff --git a/ortools/base/int_type.h b/ortools/base/int_type.h index 02cb4abb8e..c2f5a01a7f 100644 --- a/ortools/base/int_type.h +++ b/ortools/base/int_type.h @@ -247,14 +247,14 @@ class IntType { // -- ASSIGNMENT OPERATORS --------------------------------------------------- // We support the following assignment operators: =, +=, -=, *=, /=, <<=, >>= // and %= for both ThisType and ValueType. -#define INT_TYPE_ASSIGNMENT_OP(op) \ - ThisType& operator op(const ThisType& arg_value) { \ - value_ op arg_value.value(); \ - return *this; \ - } \ - ThisType& operator op(ValueType arg_value) { \ - value_ op arg_value; \ - return *this; \ +#define INT_TYPE_ASSIGNMENT_OP(op) \ + ThisType& operator op(const ThisType & arg_value) { \ + value_ op arg_value.value(); \ + return *this; \ + } \ + ThisType& operator op(ValueType arg_value) { \ + value_ op arg_value; \ + return *this; \ } INT_TYPE_ASSIGNMENT_OP(+=); INT_TYPE_ASSIGNMENT_OP(-=); diff --git a/ortools/base/strong_int.h b/ortools/base/strong_int.h index 743023fa20..dba77cd734 100644 --- a/ortools/base/strong_int.h +++ b/ortools/base/strong_int.h @@ -258,14 +258,14 @@ class StrongInt { // -- ASSIGNMENT OPERATORS --------------------------------------------------- // We support the following assignment operators: =, +=, -=, *=, /=, <<=, >>= // and %= for both ThisType and ValueType. -#define STRONG_INT_TYPE_ASSIGNMENT_OP(op) \ - ThisType& operator op(const ThisType& arg_value) { \ - value_ op arg_value.value(); \ - return *this; \ - } \ - ThisType& operator op(ValueType arg_value) { \ - value_ op arg_value; \ - return *this; \ +#define STRONG_INT_TYPE_ASSIGNMENT_OP(op) \ + ThisType& operator op(const ThisType & arg_value) { \ + value_ op arg_value.value(); \ + return *this; \ + } \ + ThisType& operator op(ValueType arg_value) { \ + value_ op arg_value; \ + return *this; \ } STRONG_INT_TYPE_ASSIGNMENT_OP(+=); STRONG_INT_TYPE_ASSIGNMENT_OP(-=);