diff --git a/toonz/sources/include/tgeometry.h b/toonz/sources/include/tgeometry.h index bc0185b..9542e3e 100644 --- a/toonz/sources/include/tgeometry.h +++ b/toonz/sources/include/tgeometry.h @@ -192,7 +192,7 @@ public: inline explicit T3DPointT(const T4DPointT<T> &p); inline TPointT<T>& xy() { return *(TPointT<T>*)this; } - inline TPointT<T>& xy() const { return *(const TPointT<T>*)this; } + inline const TPointT<T>& xy() const { return *(const TPointT<T>*)this; } inline T3DPointT &operator+=(const T3DPointT &a) { return x += a.x, y += a.y, z += a.z, *this; } @@ -301,8 +301,8 @@ public: inline TPointT<T>& xy() { return *(TPointT<T>*)this; } inline T3DPointT<T>& xyz() { return *(T3DPointT<T>*)this; } - inline TPointT<T>& xy() const { return *(const TPointT<T>*)this; } - inline T3DPointT<T>& xyz() const { return *(const T3DPointT<T>*)this; } + inline const TPointT<T>& xy() const { return *(const TPointT<T>*)this; } + inline const T3DPointT<T>& xyz() const { return *(const T3DPointT<T>*)this; } inline bool operator==(const T4DPointT &p) const { return x == p.x && y == p.y && z == p.z && w == p.w; }