use grid value_type instead of hardcoding int for feature id type

This commit is contained in:
Dane Springmeyer 2012-12-19 19:17:42 -08:00
parent 1a771f07c6
commit fa1ac1307f

View file

@ -80,7 +80,7 @@ void hit_grid<T>::clear()
template <typename T> template <typename T>
void hit_grid<T>::add_feature(mapnik::feature_impl & feature) void hit_grid<T>::add_feature(mapnik::feature_impl & feature)
{ {
int feature_id = feature.id(); value_type feature_id = feature.id();
// avoid adding duplicate features (e.g. in the case of both a line symbolizer and a polygon symbolizer) // avoid adding duplicate features (e.g. in the case of both a line symbolizer and a polygon symbolizer)
typename feature_key_type::const_iterator feature_pos = f_keys_.find(feature_id); typename feature_key_type::const_iterator feature_pos = f_keys_.find(feature_id);
if (feature_pos != f_keys_.end()) if (feature_pos != f_keys_.end())