From 906f78949458732f138e4e2b79843c75e9d52f87 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Wed, 20 Jan 2010 20:31:57 +0100 Subject: Go back to using TR1 unordered containers to fix warnings. Add configure code to detect the broken header and display Wiki page URL. (bzr r9006) --- src/ui/tool/control-point-selection.h | 22 ++++------------------ src/ui/tool/multi-path-manipulator.cpp | 18 ++++-------------- src/ui/tool/node.cpp | 2 +- 3 files changed, 9 insertions(+), 33 deletions(-) (limited to 'src/ui') diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h index dce685575..54d724f00 100644 --- a/src/ui/tool/control-point-selection.h +++ b/src/ui/tool/control-point-selection.h @@ -13,11 +13,8 @@ #define SEEN_UI_TOOL_NODE_SELECTION_H #include -// those are broken beyond hope on OSX. -//#include -//#include -#include -#include +#include +#include #include #include #include @@ -30,8 +27,6 @@ #include "ui/tool/commit-events.h" #include "ui/tool/manipulator.h" -namespace std { using namespace __gnu_cxx; } - class SPDesktop; namespace Inkscape { @@ -41,15 +36,6 @@ class SelectableControlPoint; } } -namespace __gnu_cxx { -template<> -struct hash { - size_t operator()(Inkscape::UI::SelectableControlPoint *p) const { - return reinterpret_cast(p); - } -}; -} // namespace __gnu_cxx - namespace Inkscape { namespace UI { @@ -58,9 +44,9 @@ public: ControlPointSelection(SPDesktop *d, SPCanvasGroup *th_group); ~ControlPointSelection(); typedef std::list connlist_type; - typedef std::hash_map< SelectableControlPoint *, + typedef std::tr1::unordered_map< SelectableControlPoint *, boost::shared_ptr > map_type; - typedef std::hash_set< SelectableControlPoint * > set_type; + typedef std::tr1::unordered_set< SelectableControlPoint * > set_type; typedef set_type Set; // convenience alias typedef map_type::iterator iterator; diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp index c05b71cd4..d1138abd5 100644 --- a/src/ui/tool/multi-path-manipulator.cpp +++ b/src/ui/tool/multi-path-manipulator.cpp @@ -1,5 +1,5 @@ /** @file - * Path manipulator - implementation + * Multi path manipulator - implementation */ /* Authors: * Krzysztof KosiƄski @@ -8,8 +8,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -//#include -#include +#include #include #include #include @@ -26,16 +25,7 @@ #include "ui/tool/multi-path-manipulator.h" #include "ui/tool/path-manipulator.h" -namespace std { using namespace __gnu_cxx; } - -namespace __gnu_cxx { -template<> -struct hash { - size_t operator()(Inkscape::UI::NodeList::iterator const &n) const { - return reinterpret_cast(n.ptr()); - } -}; -} +namespace std { using namespace tr1; } namespace Inkscape { namespace UI { @@ -43,7 +33,7 @@ namespace UI { namespace { typedef std::pair IterPair; typedef std::vector IterPairList; -typedef std::hash_set IterSet; +typedef std::unordered_set IterSet; typedef std::multimap DistanceMap; typedef std::pair DistanceMapItem; diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index c1dfcdeaa..ef98e7c84 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -955,7 +955,7 @@ Glib::ustring Node::_getTip(unsigned state) if (state_held_control(state)) { if (state_held_alt(state)) { - return C_("Path node tip", "Ctrl+Alt: move along handle lines"); + return C_("Path node tip", "Ctrl+Alt: move along handle lines, click to delete node"); } return C_("Path node tip", "Ctrl: move along axes, click to change node type"); -- cgit v1.2.3