diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-10-18 22:53:43 +0000 |
|---|---|---|
| committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-10-18 23:26:26 +0000 |
| commit | ddffc1a8ab9e3357a8e0350ff08b5ef1a9fb2651 (patch) | |
| tree | 9c91b6224ee6af12f030f03635f52b654db59840 /src/util/units.h | |
| parent | Merge branch 'bugfix-1789838-confirmation-needed-before-overwriting-template'... (diff) | |
| download | inkscape-ddffc1a8ab9e3357a8e0350ff08b5ef1a9fb2651.tar.gz inkscape-ddffc1a8ab9e3357a8e0350ff08b5ef1a9fb2651.zip | |
Remove util/unordered-containers.h aliases.
Diffstat (limited to 'src/util/units.h')
| -rw-r--r-- | src/util/units.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/util/units.h b/src/util/units.h index e4530d0c3..17c54eb4e 100644 --- a/src/util/units.h +++ b/src/util/units.h @@ -13,12 +13,24 @@ #ifndef INKSCAPE_UTIL_UNITS_H #define INKSCAPE_UTIL_UNITS_H -#include <map> +#include <unordered_map> #include <boost/operators.hpp> #include <glibmm/ustring.h> #include <2geom/coord.h> #include "svg/svg-length.h" -#include "unordered-containers.h" + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +namespace std { +template <> +struct hash<Glib::ustring> : public std::unary_function<Glib::ustring, std::size_t> { + std::size_t operator()(Glib::ustring const &s) const { + return hash<std::string>()(s.raw()); + } +}; +} // namespace std + +#endif namespace Inkscape { namespace Util { @@ -137,8 +149,8 @@ public: UnitTable(); virtual ~UnitTable(); - typedef INK_UNORDERED_MAP<Glib::ustring, Unit> UnitMap; - typedef INK_UNORDERED_MAP<unsigned, Unit*> UnitCodeMap; + typedef std::unordered_map<Glib::ustring, Unit> UnitMap; + typedef std::unordered_map<unsigned, Unit*> UnitCodeMap; /** Add a new unit to the table */ void addUnit(Unit const &u, bool primary); |
