summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/multi-path-manipulator.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-01-14 22:38:54 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-01-14 22:38:54 +0000
commit4756aa99f5756a6cac199c1aae6c37514cf1c562 (patch)
tree6bb3182cb7668bdeca18aeb1a82b9182873c51cd /src/ui/tool/multi-path-manipulator.cpp
parentRemove "show transform handles" from prefs - no longer necessary (diff)
downloadinkscape-4756aa99f5756a6cac199c1aae6c37514cf1c562.tar.gz
inkscape-4756aa99f5756a6cac199c1aae6c37514cf1c562.zip
Replace std::tr1::unordered_(map|set) with __gnu_cxx::hash_(map|set),
to work around broken headers in some GCC versions. (bzr r8980)
Diffstat (limited to 'src/ui/tool/multi-path-manipulator.cpp')
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index 3ae7e4d24..818bdaedc 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -8,7 +8,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <tr1/unordered_set>
+//#include <tr1/unordered_set>
+#include <ext/hash_set>
#include <boost/shared_ptr.hpp>
#include <glib.h>
#include <glibmm/i18n.h>
@@ -25,7 +26,16 @@
#include "ui/tool/multi-path-manipulator.h"
#include "ui/tool/path-manipulator.h"
-namespace std { using namespace tr1; }
+namespace std { using namespace __gnu_cxx; }
+
+namespace __gnu_cxx {
+template<>
+struct hash<Inkscape::UI::NodeList::iterator> {
+ size_t operator()(Inkscape::UI::NodeList::iterator const &n) const {
+ return reinterpret_cast<size_t>(n.ptr());
+ }
+};
+}
namespace Inkscape {
namespace UI {
@@ -33,7 +43,7 @@ namespace UI {
namespace {
typedef std::pair<NodeList::iterator, NodeList::iterator> IterPair;
typedef std::vector<IterPair> IterPairList;
-typedef std::unordered_set<NodeList::iterator> IterSet;
+typedef std::hash_set<NodeList::iterator> IterSet;
typedef std::multimap<double, IterPair> DistanceMap;
typedef std::pair<double, IterPair> DistanceMapItem;