From 46fd0e8c49da44226151096546905589819bbdf5 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Thu, 4 Mar 2010 00:44:53 -0800 Subject: Fixing build breakage with more proper autoconf usage. (bzr r9138) --- src/ui/tool/control-point-selection.h | 22 +++++++++++++++++----- src/ui/tool/multi-path-manipulator.cpp | 15 +++++++++++++-- 2 files changed, 30 insertions(+), 7 deletions(-) (limited to 'src/ui') diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h index b3c2f422b..6efb63b67 100644 --- a/src/ui/tool/control-point-selection.h +++ b/src/ui/tool/control-point-selection.h @@ -14,8 +14,7 @@ #include #include -#include -#include +#include "util/set-types.h" #include #include <2geom/forward.h> #include <2geom/point.h> @@ -34,6 +33,17 @@ class SelectableControlPoint; } } +#ifdef USE_GNU_HASHES +namespace __gnu_cxx { +template<> +struct hash { + size_t operator()(Inkscape::UI::SelectableControlPoint *p) const { + return reinterpret_cast(p); + } +}; +} // namespace __gnu_cxx +#endif // USE_GNU_HASHES + namespace Inkscape { namespace UI { @@ -41,7 +51,7 @@ class ControlPointSelection : public Manipulator, public sigc::trackable { public: ControlPointSelection(SPDesktop *d, SPCanvasGroup *th_group); ~ControlPointSelection(); - typedef boost::unordered_set< SelectableControlPoint * > set_type; + typedef optim_set< SelectableControlPoint * > set_type; typedef set_type Set; // convenience alias typedef set_type::iterator iterator; @@ -76,7 +86,9 @@ public: void erase(iterator first, iterator last); // find - iterator find(const key_type &k) { return _points.find(k); } + iterator find(const key_type &k) { + return _points.find(k); + } // Sometimes it is very useful to keep a list of all selectable points. set_type const &allPoints() const { return _all_points; } @@ -130,7 +142,7 @@ private: set_type _points; set_type _all_points; - boost::unordered_map _original_positions; + optim_map _original_positions; boost::optional _rot_radius; boost::optional _mouseover_rot_radius; Geom::OptRect _bounds; diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp index 3b0852e6e..d86a7e9e0 100644 --- a/src/ui/tool/multi-path-manipulator.cpp +++ b/src/ui/tool/multi-path-manipulator.cpp @@ -8,7 +8,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include +#include "util/set-types.h" #include #include #include @@ -25,13 +25,24 @@ #include "ui/tool/multi-path-manipulator.h" #include "ui/tool/path-manipulator.h" +#ifdef USE_GNU_HASHES +namespace __gnu_cxx { +template<> +struct hash { + size_t operator()(Inkscape::UI::NodeList::iterator const &n) const { + return reinterpret_cast(n.ptr()); + } +}; +} // namespace __gnu_cxx +#endif // USE_GNU_HASHES + namespace Inkscape { namespace UI { namespace { typedef std::pair IterPair; typedef std::vector IterPairList; -typedef boost::unordered_set IterSet; +typedef optim_set IterSet; typedef std::multimap DistanceMap; typedef std::pair DistanceMapItem; -- cgit v1.2.3