From 9700ad4fb2e3a6e7f8140cdb984141e20fe34ae5 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 20 Dec 2010 19:17:56 +0000 Subject: [PATCH] avoid compiler warning by only adding 'get_overview_meta' in debug mode --- plugins/input/gdal/gdal_featureset.cpp | 10 ++-------- plugins/input/gdal/gdal_featureset.hpp | 2 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 6e8b6082b..26d9ca7bb 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -373,29 +373,24 @@ feature_ptr gdal_featureset::get_feature_at_point(mapnik::coord2d const& pt) return feature_ptr(); } +#ifdef MAPNIK_DEBUG void gdal_featureset::get_overview_meta(GDALRasterBand * band) { int band_overviews = band->GetOverviewCount(); if (band_overviews > 0) { -#ifdef MAPNIK_DEBUG std::clog << "GDAL Plugin: "<< band_overviews << " overviews found!" << std::endl; -#endif for (int b = 0; b < band_overviews; b++) { GDALRasterBand * overview = band->GetOverview (b); -#ifdef MAPNIK_DEBUG std::clog << boost::format("GDAL Plugin: Overview=%d Width=%d Height=%d") % b % overview->GetXSize() % overview->GetYSize() << std::endl; -#endif } } else { -#ifdef MAPNIK_DEBUG std::clog << "GDAL Plugin: No overviews found!" << std::endl; -#endif } int bsx,bsy; @@ -403,10 +398,9 @@ void gdal_featureset::get_overview_meta(GDALRasterBand * band) band->GetBlockSize(&bsx,&bsy); scale = band->GetScale(); -#ifdef MAPNIK_DEBUG std::clog << boost::format("GDAL Plugin: Block=%dx%d Scale=%f Type=%s Color=%s") % bsx % bsy % scale % GDALGetDataTypeName(band->GetRasterDataType()) % GDALGetColorInterpretationName(band->GetColorInterpretation()) << std::endl; -#endif } +#endif diff --git a/plugins/input/gdal/gdal_featureset.hpp b/plugins/input/gdal/gdal_featureset.hpp index 6f98f8e26..99261773f 100644 --- a/plugins/input/gdal/gdal_featureset.hpp +++ b/plugins/input/gdal/gdal_featureset.hpp @@ -46,7 +46,9 @@ class gdal_featureset : public mapnik::Featureset private: mapnik::feature_ptr get_feature(mapnik::query const& q); mapnik::feature_ptr get_feature_at_point(mapnik::coord2d const& p); +#ifdef MAPNIK_DEBUG void get_overview_meta(GDALRasterBand * band); +#endif GDALDataset & dataset_; int band_; gdal_query gquery_;