c++ style casts

This commit is contained in:
Artem Pavlenko 2020-11-18 16:15:59 +00:00
parent 3ae38bbab1
commit 4227fd5d69
2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ mapnik::feature_ptr csv_index_featureset::next()
{ {
auto pos = *itr_++; auto pos = *itr_++;
#if defined(MAPNIK_MEMORY_MAPPED_FILE) #if defined(MAPNIK_MEMORY_MAPPED_FILE)
char const* start = (char const*)mapped_region_->get_address() + pos.off; char const* start = static_cast<char const*>(mapped_region_->get_address()) + pos.off;
char const* end = start + pos.size; char const* end = start + pos.size;
#else #else
std::fseek(file_.get(), pos.off, SEEK_SET); std::fseek(file_.get(), pos.off, SEEK_SET);

View file

@ -88,7 +88,7 @@ mapnik::feature_ptr geojson_index_featureset::next()
{ {
auto pos = *itr_++; auto pos = *itr_++;
#if defined(MAPNIK_MEMORY_MAPPED_FILE) #if defined(MAPNIK_MEMORY_MAPPED_FILE)
char const* start = (char const*)mapped_region_->get_address() + pos.off; char const* start = static_cast<char const*>(mapped_region_->get_address()) + pos.off;
char const* end = start + pos.size; char const* end = start + pos.size;
#else #else
std::fseek(file_.get(), pos.off, SEEK_SET); std::fseek(file_.get(), pos.off, SEEK_SET);