From 3918e889f1d36b3ee4be0a06714c59ea42dc09f3 Mon Sep 17 00:00:00 2001 From: Luca Padovani <luca@src.gnome.org> Date: Mon, 23 Mar 2009 17:34:14 +0000 Subject: + small fixes for removing gcc warnings svn path=/trunk/; revision=1185 --- diff --git a/configure.ac b/configure.ac index 85d26b9..4f2118e 100644 --- a/configure.ac +++ b/configure.ac @@ -252,6 +252,16 @@ AC_SUBST(GTKMATHVIEW_SIZEOF_WCHAR_T, "$ac_cv_sizeof_wchar_t") AC_LANG_PUSH(C++) +AC_CHECK_HEADERS(unordered_map, + [ + AC_DEFINE(GMV_HAVE_UNORDERED_MAP,1,[Define if <unordered_map> is provided]) + GMV_HAVE_UNORDERED_MAP_CFLAGS=-DGMV_HAVE_UNORDERED_MAP=1 + ], + [ + GMV_HAVE_UNORDERED_MAP_CFLAGS= + ] +) +AC_SUBST(GMV_HAVE_UNORDERED_MAP_CFLAGS) AC_CHECK_HEADERS(hash_map, [ AC_DEFINE(GMV_HAVE_HASH_MAP,1,[Define if <hash_map> is provided]) diff --git a/src/backend/common/ComputerModernShaper.cc b/src/backend/common/ComputerModernShaper.cc index 8fa8c43..e44f36f 100644 --- a/src/backend/common/ComputerModernShaper.cc +++ b/src/backend/common/ComputerModernShaper.cc @@ -582,7 +582,7 @@ static UChar8 cmrTTFMap[] = }; #endif -static ComputerModernShaper::PlainChar cmsMap[] = +static ComputerModernShaper::PlainChar32 cmsMap[] = { { 0x007B, 0x66 }, // LEFT CURLY BRACKET { 0x007D, 0x67 }, // RIGHT CURLY BRACKET diff --git a/src/common/HashMap.hh b/src/common/HashMap.hh index d37b531..25cf8a2 100644 --- a/src/common/HashMap.hh +++ b/src/common/HashMap.hh @@ -24,14 +24,17 @@ #define __HashMap_hh__ // !!! BEGIN WARNING: hash_map is not part of the STL !!! -#if defined(GMV_HAVE_EXT_HASH_MAP) +#if defined(GMV_HAVE_UNORDERED_MAP) + #include <unordered_map> +#define HASH_MAP_NS std +#elif defined(GMV_HAVE_EXT_HASH_MAP) #include <ext/hash_map> #define HASH_MAP_NS __gnu_cxx #elif defined(GMV_HAVE_HASH_MAP) #include <hash_map> #define HASH_MAP_NS std #else -#error "no implementation of hash_map could be found" +#error "no implementation of unordered_map or hash_map could be found" #endif // !!! END WARNING: hash_map is not part of the STL !!! diff --git a/src/engine/mathml/MathMLTableFormatter.cc b/src/engine/mathml/MathMLTableFormatter.cc index 05ab60b..537b212 100644 --- a/src/engine/mathml/MathMLTableFormatter.cc +++ b/src/engine/mathml/MathMLTableFormatter.cc @@ -102,9 +102,6 @@ MathMLTableFormatter::init(const FormattingContext& ctxt, equalRows = ToBoolean(equalRowsV); equalColumns = ToBoolean(equalColumnsV); - assert(nGridRows >= 0); - assert(nGridColumns >= 0); - #if 0 std::cerr << "CI SIAMO: " << nRows << "x" << nColumns << std::endl << "grid: " << nGridRows << "x" << nGridColumns << std::endl