diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-22 10:38:42 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-22 15:53:18 -0700 |
commit | 5939dd5b412fcc1ef857711a137589aa865bd442 (patch) | |
tree | 4bd4e021ea564ee262cff56ab7b6f76e98b29471 /src/mbgl/style/types.cpp | |
parent | d77e35b6866e461c3cb05de2112d548be4ef7780 (diff) | |
download | qtlocation-mapboxgl-5939dd5b412fcc1ef857711a137589aa865bd442.tar.gz |
[core] Use the proper type for font stacks
Diffstat (limited to 'src/mbgl/style/types.cpp')
-rw-r--r-- | src/mbgl/style/types.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mbgl/style/types.cpp b/src/mbgl/style/types.cpp new file mode 100644 index 0000000000..27574afa93 --- /dev/null +++ b/src/mbgl/style/types.cpp @@ -0,0 +1,16 @@ +#include <mbgl/style/types.hpp> + +#include <boost/functional/hash.hpp> +#include <boost/algorithm/string/join.hpp> + +namespace mbgl { + +std::string fontStackToString(const FontStack& fontStack) { + return boost::algorithm::join(fontStack, ","); +} + +std::size_t FontStackHash::operator()(const FontStack& fontStack) const { + return boost::hash_range(fontStack.begin(), fontStack.end()); +} + +} // namespace mbgl |