mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
554 stars 117 forks source link

Differentiate values by type too #281

Closed Algunenano closed 6 years ago

Algunenano commented 6 years ago

In the test the x value is returned as bool(false) instead of int(0) which will throw when we force a .get<long int>()).

I've modified both the comparison and the hash functions of the values_container to avoid collisions for mapnik::value's with the same value (as in operator== comparison) but different types (pbf_tag_type for protozero). Fixes https://github.com/mapbox/mapnik-vector-tile/issues/280

Algunenano commented 6 years ago

Seems to fail in OSX due to get not being available.

../test/vector_tile_pbf.cpp:631:35: error: no matching member function for call to 'get'
    CHECK_NOTHROW(f_ptr->get("x").get<long int>());

Any idea why? I could either ifndef it for OSX or change the test to use some kind of visitor but it's a PITA.