]> git.localhorst.tv Git - l2e.git/blobdiff - src/graphics/Menu.h
pass point as reference in graphics Draw functions
[l2e.git] / src / graphics / Menu.h
index 4d448b62df6de2b824f85eac8f2dacf587857ec4..c879cc979556f9b9c1d94d60f7552f5cf338d36e 100644 (file)
@@ -61,7 +61,7 @@ public:
        void Reserve(int n) { entries.reserve(n); }
        void Clear() { entries.clear(); }
 
-       void Draw(SDL_Surface *dest, geometry::Point<int> position) const;
+       void Draw(SDL_Surface *dest, const geometry::Point<int> &position) const;
 
 private:
        int GetRow(int index) const { return index / cols; }
@@ -196,7 +196,7 @@ void Menu<T>::SelectIndex(int index) {
 
 
 template<class T>
-void Menu<T>::Draw(SDL_Surface *dest, geometry::Point<int> position) const {
+void Menu<T>::Draw(SDL_Surface *dest, const geometry::Point<int> &position) const {
        int start(topRow * cols);
        int slots(rows * cols);
        int items(entries.size() - start);