From 82b15bdd68bbab04c20c658e372f06c3824f22fa Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 30 Oct 2012 16:55:06 -0700 Subject: [PATCH] be more explicit about unsigned type for rgba_palette::quantize --- include/mapnik/palette.hpp | 4 ++-- src/palette.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mapnik/palette.hpp b/include/mapnik/palette.hpp index fd4b87dd3..4dcbe2ab4 100644 --- a/include/mapnik/palette.hpp +++ b/include/mapnik/palette.hpp @@ -137,8 +137,8 @@ public: const std::vector& palette() const; const std::vector& alphaTable() const; - unsigned quantize(rgba const& c) const; - inline unsigned quantize(unsigned const& c) const + unsigned char quantize(rgba const& c) const; + inline unsigned char quantize(unsigned const& c) const { rgba_hash_table::const_iterator it = color_hashmap_.find(c); if (it != color_hashmap_.end()) diff --git a/src/palette.cpp b/src/palette.cpp index 6125d8808..f402b5dbd 100644 --- a/src/palette.cpp +++ b/src/palette.cpp @@ -75,9 +75,9 @@ bool rgba_palette::valid() const } // return color index in returned earlier palette -unsigned rgba_palette::quantize(rgba const& c) const +unsigned char rgba_palette::quantize(rgba const& c) const { - unsigned index = 0; + unsigned char index = 0; if (colors_ == 1) return index; rgba_hash_table::iterator it = color_hashmap_.find(c);