summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils/point.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/utils/point.h b/src/utils/point.h
index 0ebc37c0..8436b8c4 100644
--- a/src/utils/point.h
+++ b/src/utils/point.h
@@ -1,6 +1,6 @@
/*
* The Mana Server
- * Copyright (C) 2004-2010 The Mana World Development Team
+ * Copyright (C) 2004-2011 The Mana World Development Team
*
* This file is part of The Mana Server.
*
@@ -22,6 +22,8 @@
#define POINT_H
#include <algorithm>
+#include <string>
+#include <sstream>
/**
* A point in positive space. Usually represents pixel coordinates on a map.
@@ -58,6 +60,13 @@ class Point
{
return (x != other.x || y != other.y);
}
+
+ std::string str() const
+ {
+ std::ostringstream ssPoint;
+ ssPoint << "(" << x << ", " << y << ")";
+ return ssPoint.str();
+ }
};
/**