summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ffa4136)
raw | patch | inline | side by side (parent: ffa4136)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Tue, 2 Mar 2010 22:52:32 +0000 (23:52 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Tue, 2 Mar 2010 22:52:32 +0000 (23:52 +0100) |
when using Apple compilers.
diff --git a/configure.ac b/configure.ac
index ca49d5f54cfd3192f73a7ff2498bb6d1e1c99476..5613f49a8fc035a48609d521dc579f7a7ddffe2d 100644 (file)
--- a/configure.ac
+++ b/configure.ac
fi
fi
-# Test for broken unordered_set on GCC 4.0.0, shipped with Apple XCode tools
-# This is a system header so we check it as soon as possible
-AC_MSG_CHECKING([TR1 unordered_set usability])
-AC_COMPILE_IFELSE([
-#include <tr1/unordered_set>
-int main() {
- std::tr1::unordered_set<int> i, j;
- i = j;
- return 0;
-}
-], [unordered_set_broken=no], [unordered_set_broken=yes])
-if test "x$unordered_set_broken" = "xyes"; then
- AC_MSG_RESULT([broken])
- AC_MSG_ERROR([
-You have a broken version of the <tr1/unordered_set> header. See
-http://wiki.inkscape.org/wiki/index.php/HashtableFixOSX
-for information on how to fix this problem.])
-else
- AC_MSG_RESULT([ok])
-fi
-
# Test whether GCC emits a spurious warning when using boost::optional
# If yes, turn off strict aliasing warnings to reduce noise
# and allow the legitimate warnings to stand out
index 09d9e2c4f2f92dfb2a5441ccd257d5190cc27288..d6fc207b0d92bccab054e71ed7c0653d58b9c59d 100644 (file)
/* Freetype2 */
# include <pango/pangoft2.h>
-#include <tr1/unordered_map>
+#include <boost/unordered_map.hpp>
-typedef std::tr1::unordered_map<PangoFontDescription*, font_instance*, font_descr_hash, font_descr_equal> FaceMapType;
+typedef boost::unordered_map<PangoFontDescription*, font_instance*, font_descr_hash, font_descr_equal> FaceMapType;
// need to avoid using the size field
size_t font_descr_hash::operator()( PangoFontDescription *const &x) const {
index 628e3cba0c630b1bb5dd6df0109f8bd3ceef2a09..557e9106e4b0d278c06391753334adce016ab3cf 100644 (file)
# include FT_TRUETYPE_TABLES_H
# include <pango/pangoft2.h>
-#include <tr1/unordered_map>
+#include <boost/unordered_map.hpp>
struct font_style_hash : public std::unary_function<font_style, size_t> {
bool operator()(font_style const &a, font_style const &b) const;
};
-typedef std::tr1::unordered_map<font_style, raster_font*, font_style_hash, font_style_equal> StyleMap;
+typedef boost::unordered_map<font_style, raster_font*, font_style_hash, font_style_equal> StyleMap;
index d982d6becd94588ec7bf2a0bd144801c9706d124..dde9ef218aefadb9bd467c70fbaa342a2a6aeaab 100644 (file)
#define SEEN_UI_TOOL_NODE_SELECTION_H
#include <memory>
-#include <tr1/unordered_map>
-#include <tr1/unordered_set>
#include <boost/optional.hpp>
+#include <boost/unordered_set.hpp>
#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/hash.h"
#include "ui/tool/commit-events.h"
#include "ui/tool/manipulator.h"
public:
ControlPointSelection(SPDesktop *d, SPCanvasGroup *th_group);
~ControlPointSelection();
- typedef std::tr1::unordered_set< SelectableControlPoint * > set_type;
+ typedef boost::unordered_set< SelectableControlPoint * > set_type;
typedef set_type Set; // convenience alias
typedef set_type::iterator iterator;
index 5d7b520c8d15df2611cedd7858fc92eb20a6ae98..f5646ac36c81f6b1777fb9c3b22beba44c88df96 100644 (file)
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#include <tr1/unordered_set>
+#include <boost/unordered_set.hpp>
#include <boost/shared_ptr.hpp>
#include <glib.h>
#include <glibmm/i18n.h>
#include "ui/tool/multi-path-manipulator.h"
#include "ui/tool/path-manipulator.h"
-namespace std { using namespace tr1; }
-
namespace Inkscape {
namespace UI {
namespace {
typedef std::pair<NodeList::iterator, NodeList::iterator> IterPair;
typedef std::vector<IterPair> IterPairList;
-typedef std::unordered_set<NodeList::iterator> IterSet;
+typedef boost::unordered_set<NodeList::iterator> IterSet;
typedef std::multimap<double, IterPair> DistanceMap;
typedef std::pair<double, IterPair> DistanceMapItem;
diff --git a/src/util/hash.h b/src/util/hash.h
--- a/src/util/hash.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/** @file
- * Hash function for various things
- */
-/* Authors:
- * Krzysztof Kosiński <tweenk.pl@gmail.com>
- *
- * Copyright (C) 2009 Authors
- * Released under GNU GPL, read the file 'COPYING' for more information
- */
-
-#ifndef SEEN_UTIL_HASH_H
-#define SEEN_UTIL_HASH_H
-
-#include <boost/shared_ptr.hpp>
-
-namespace std {
-namespace tr1 {
-
-/** Hash function for Boost shared pointers */
-template <typename T>
-struct hash< boost::shared_ptr<T> > : public std::unary_function<boost::shared_ptr<T>, size_t> {
- size_t operator()(boost::shared_ptr<T> p) const {
- return reinterpret_cast<size_t>(p.get());
- }
-};
-
-} // namespace tr1
-} // namespace std
-
-#endif
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :