diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-04 20:52:18 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-04 20:52:18 +0000 |
| commit | 98060a4e6f02b418f30b4b736e5880a357454c40 (patch) | |
| tree | 612a017ac6ab695a7dc5dffe49779a5a74fd1906 /src/lib/position.h | |
| parent | 70ee6cc5cef66a4aed252dbfa2390cc9f0c8c286 (diff) | |
Do lots of the player processing with less copying.
Diffstat (limited to 'src/lib/position.h')
| -rw-r--r-- | src/lib/position.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/position.h b/src/lib/position.h index 8768bf5a8..f9bd0987c 100644 --- a/src/lib/position.h +++ b/src/lib/position.h @@ -43,4 +43,11 @@ public: T y; }; +template<class T> +Position<T> +operator+ (Position<T> const & a, Position<T> const & b) +{ + return Position<T> (a.x + b.x, a.y + b.y); +} + #endif |
