mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
Statistic class should return const reference to *this, not a reference to
the data type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6918c079a1
commit
4932b31dce
@ -84,12 +84,12 @@ public:
|
||||
~Statistic() { destroy(); }
|
||||
|
||||
// Allow use of this class as the value itself...
|
||||
inline operator DataType() const { return Value; }
|
||||
inline const DataType &operator=(DataType Val) { Value = Val; return Value; }
|
||||
inline const DataType &operator++() { return ++Value; }
|
||||
inline DataType operator++(int) { return Value++; }
|
||||
inline const DataType &operator+=(const DataType &V) { return Value += V; }
|
||||
inline const DataType &operator-=(const DataType &V) { return Value -= V; }
|
||||
operator DataType() const { return Value; }
|
||||
const Statistic &operator=(DataType Val) { Value = Val; return *this; }
|
||||
const Statistic &operator++() { ++Value; return *this; }
|
||||
DataType operator++(int) { return Value++; }
|
||||
const Statistic &operator+=(const DataType &V) { Value += V; return *this; }
|
||||
const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -84,12 +84,12 @@ public:
|
||||
~Statistic() { destroy(); }
|
||||
|
||||
// Allow use of this class as the value itself...
|
||||
inline operator DataType() const { return Value; }
|
||||
inline const DataType &operator=(DataType Val) { Value = Val; return Value; }
|
||||
inline const DataType &operator++() { return ++Value; }
|
||||
inline DataType operator++(int) { return Value++; }
|
||||
inline const DataType &operator+=(const DataType &V) { return Value += V; }
|
||||
inline const DataType &operator-=(const DataType &V) { return Value -= V; }
|
||||
operator DataType() const { return Value; }
|
||||
const Statistic &operator=(DataType Val) { Value = Val; return *this; }
|
||||
const Statistic &operator++() { ++Value; return *this; }
|
||||
DataType operator++(int) { return Value++; }
|
||||
const Statistic &operator+=(const DataType &V) { Value += V; return *this; }
|
||||
const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user