summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2009-11-29 15:33:18 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2009-11-29 15:33:18 +0000
commit31bb8269c26a781036448ed8f8cd93cc84fb2118 (patch)
treec714ce9b38e9b75680b61e7e0992aa2ab40e2584 /src/libnrtype
parentDeprecation warning fix on xcf export (diff)
downloadinkscape-31bb8269c26a781036448ed8f8cd93cc84fb2118.tar.gz
inkscape-31bb8269c26a781036448ed8f8cd93cc84fb2118.zip
First GSoC node tool commit to Bazaar
(bzr r8846.1.1)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp2
-rw-r--r--src/libnrtype/FontFactory.h6
-rw-r--r--src/libnrtype/FontInstance.cpp2
-rw-r--r--src/libnrtype/font-instance.h6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index fec9316b9..db7cd9747 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -43,7 +43,7 @@ size_t font_descr_hash::operator()( PangoFontDescription *const &x) const {
h += (int)pango_font_description_get_stretch(x);
return h;
}
-bool font_descr_equal::operator()( PangoFontDescription *const&a, PangoFontDescription *const &b) {
+bool font_descr_equal::operator()( PangoFontDescription *const&a, PangoFontDescription *const &b) const {
//if ( pango_font_description_equal(a,b) ) return true;
char const *fa = pango_font_description_get_family(a);
char const *fb = pango_font_description_get_family(b);
diff --git a/src/libnrtype/FontFactory.h b/src/libnrtype/FontFactory.h
index 9f4b31a2e..5253f6bbd 100644
--- a/src/libnrtype/FontFactory.h
+++ b/src/libnrtype/FontFactory.h
@@ -11,7 +11,7 @@
#include <functional>
#include <algorithm>
-#include <ext/hash_map>
+#include <tr1/unordered_map>
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -46,7 +46,7 @@ struct font_descr_hash : public std::unary_function<PangoFontDescription*,size_t
size_t operator()(PangoFontDescription *const &x) const;
};
struct font_descr_equal : public std::binary_function<PangoFontDescription*, PangoFontDescription*, bool> {
- bool operator()(PangoFontDescription *const &a, PangoFontDescription *const &b);
+ bool operator()(PangoFontDescription *const &a, PangoFontDescription *const &b) const;
};
// Comparison functions for style names
@@ -84,7 +84,7 @@ public:
double fontSize; /**< The huge fontsize used as workaround for hinting.
* Different between freetype and win32. */
- __gnu_cxx::hash_map<PangoFontDescription*, font_instance*, font_descr_hash, font_descr_equal> loadedFaces;
+ std::tr1::unordered_map<PangoFontDescription*, font_instance*, font_descr_hash, font_descr_equal> loadedFaces;
font_factory();
virtual ~font_factory();
diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp
index e1413b46e..d9a0c43e6 100644
--- a/src/libnrtype/FontInstance.cpp
+++ b/src/libnrtype/FontInstance.cpp
@@ -60,7 +60,7 @@ size_t font_style_hash::operator()(const font_style &x) const {
return h;
}
-bool font_style_equal::operator()(const font_style &a,const font_style &b) {
+bool font_style_equal::operator()(const font_style &a,const font_style &b) const {
for (int i=0;i<6;i++) {
if ( (int)(100*a.transform[i]) != (int)(100*b.transform[i]) ) return false;
}
diff --git a/src/libnrtype/font-instance.h b/src/libnrtype/font-instance.h
index 4209a20af..ce3f6cf1b 100644
--- a/src/libnrtype/font-instance.h
+++ b/src/libnrtype/font-instance.h
@@ -1,7 +1,7 @@
#ifndef SEEN_LIBNRTYPE_FONT_INSTANCE_H
#define SEEN_LIBNRTYPE_FONT_INSTANCE_H
-#include <ext/hash_map>
+#include <tr1/unordered_map>
#include <map>
#include <pango/pango-types.h>
#include <pango/pango-font.h>
@@ -26,13 +26,13 @@ struct font_style_hash : public std::unary_function<font_style, size_t> {
};
struct font_style_equal : public std::binary_function<font_style, font_style, bool> {
- bool operator()(font_style const &a, font_style const &b);
+ bool operator()(font_style const &a, font_style const &b) const;
};
class font_instance {
public:
// hashmap to get the raster_font for a given style
- __gnu_cxx::hash_map<font_style, raster_font*, font_style_hash, font_style_equal> loadedStyles;
+ std::tr1::unordered_map<font_style, raster_font*, font_style_hash, font_style_equal> loadedStyles;
// the real source of the font
PangoFont* pFont;
// depending on the rendering backend, different temporary data