# HG changeset patch # User KUDr # Date 1172874560 0 # Node ID 35a9b459de1965803892c2befaead4c52d17961e # Parent d8a2c68446500aaecff2dfcc198005d4a24587a5 (svn r8982) [cpp_gui] -Codechange: when moving Point by given offset, the offset can now be of different type (i.e. int16 vs. int32) diff -r d8a2c6844650 -r 35a9b459de19 src/misc/rect.hpp --- a/src/misc/rect.hpp Fri Mar 02 21:21:41 2007 +0000 +++ b/src/misc/rect.hpp Fri Mar 02 22:29:20 2007 +0000 @@ -52,19 +52,19 @@ PointRaw::y += dy; } - void DoMove(const PointRaw &offset) + template void DoMove(const PointRawT &offset) { DoMove((T)offset.x, (T)offset.y); } - PointT operator +(const PointRaw &offset) const + template PointT operator +(const PointRawT &offset) const { PointT pt(*this); pt.DoMove(offset); return pt; } - PointT operator -(const PointRaw &offset) const + template PointT operator -(const PointRawT &offset) const { PointT pt(*this); pt.DoMove(-offset);