summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-03-04 21:54:38 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-03-04 21:54:38 +0000
commit91b1b6cec4776d8c2e48b54e16d698abcea6bbfe (patch)
tree1e5a2dbb736ad7cd51cbb4ef46644b92f784deed /src/ui
parentFix for invisible blured clone elements in PDF export. (diff)
downloadinkscape-91b1b6cec4776d8c2e48b54e16d698abcea6bbfe.tar.gz
inkscape-91b1b6cec4776d8c2e48b54e16d698abcea6bbfe.zip
Clean up the unordered containers fix.
(bzr r9142)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/tool/control-point-selection.h17
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp13
2 files changed, 14 insertions, 16 deletions
diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h
index 6efb63b67..514ecb2e3 100644
--- a/src/ui/tool/control-point-selection.h
+++ b/src/ui/tool/control-point-selection.h
@@ -14,13 +14,13 @@
#include <memory>
#include <boost/optional.hpp>
-#include "util/set-types.h"
#include <sigc++/sigc++.h>
#include <2geom/forward.h>
#include <2geom/point.h>
#include <2geom/rect.h>
#include "display/display-forward.h"
#include "util/accumulators.h"
+#include "util/unordered-containers.h"
#include "ui/tool/commit-events.h"
#include "ui/tool/manipulator.h"
@@ -33,17 +33,6 @@ class SelectableControlPoint;
}
}
-#ifdef USE_GNU_HASHES
-namespace __gnu_cxx {
-template<>
-struct hash<Inkscape::UI::SelectableControlPoint*> {
- size_t operator()(Inkscape::UI::SelectableControlPoint *p) const {
- return reinterpret_cast<size_t>(p);
- }
-};
-} // namespace __gnu_cxx
-#endif // USE_GNU_HASHES
-
namespace Inkscape {
namespace UI {
@@ -51,7 +40,7 @@ class ControlPointSelection : public Manipulator, public sigc::trackable {
public:
ControlPointSelection(SPDesktop *d, SPCanvasGroup *th_group);
~ControlPointSelection();
- typedef optim_set< SelectableControlPoint * > set_type;
+ typedef INK_UNORDERED_SET<SelectableControlPoint *> set_type;
typedef set_type Set; // convenience alias
typedef set_type::iterator iterator;
@@ -142,7 +131,7 @@ private:
set_type _points;
set_type _all_points;
- optim_map<SelectableControlPoint *, Geom::Point> _original_positions;
+ INK_UNORDERED_MAP<SelectableControlPoint *, Geom::Point> _original_positions;
boost::optional<double> _rot_radius;
boost::optional<double> _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 d86a7e9e0..b79a29437 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -8,7 +8,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include "util/set-types.h"
#include <boost/shared_ptr.hpp>
#include <glib.h>
#include <glibmm/i18n.h>
@@ -24,6 +23,7 @@
#include "ui/tool/node.h"
#include "ui/tool/multi-path-manipulator.h"
#include "ui/tool/path-manipulator.h"
+#include "util/unordered-containers.h"
#ifdef USE_GNU_HASHES
namespace __gnu_cxx {
@@ -40,9 +40,18 @@ namespace Inkscape {
namespace UI {
namespace {
+
+struct hash_nodelist_iterator
+ : public std::unary_function<NodeList::iterator, std::size_t>
+{
+ std::size_t operator()(NodeList::iterator i) const {
+ return INK_HASH<NodeList::iterator::pointer>()(&*i);
+ }
+};
+
typedef std::pair<NodeList::iterator, NodeList::iterator> IterPair;
typedef std::vector<IterPair> IterPairList;
-typedef optim_set<NodeList::iterator> IterSet;
+typedef INK_UNORDERED_SET<NodeList::iterator, hash_nodelist_iterator> IterSet;
typedef std::multimap<double, IterPair> DistanceMap;
typedef std::pair<double, IterPair> DistanceMapItem;