From 23b1948c6e1542f450cb5d1586d619c1307d217c Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 16 Sep 2013 10:03:54 +0100 Subject: [PATCH] + minor tweaks --- demo/viewer/viewer.pro | 3 ++- plugins/input/postgis/asyncresultset.hpp | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/demo/viewer/viewer.pro b/demo/viewer/viewer.pro index a19bc9c95..588336387 100644 --- a/demo/viewer/viewer.pro +++ b/demo/viewer/viewer.pro @@ -3,7 +3,8 @@ ###################################################################### TEMPLATE = app QT += core gui widgets -QMAKE_CXX = clang++ +QMAKE_CXX = $$system(mapnik-config --cxx) +QMAKE_LINK = $$system(mapnik-config --cxx) QMAKE_CXXFLAGS += $$system(mapnik-config --cxxflags) QMAKE_CXXFLAGS += $$system(mapnik-config --includes --dep-includes) QMAKE_LFLAGS += $$system(mapnik-config --libs) diff --git a/plugins/input/postgis/asyncresultset.hpp b/plugins/input/postgis/asyncresultset.hpp index aa217f629..a5f838ad8 100644 --- a/plugins/input/postgis/asyncresultset.hpp +++ b/plugins/input/postgis/asyncresultset.hpp @@ -33,12 +33,12 @@ class postgis_processor_context; typedef boost::shared_ptr postgis_processor_context_ptr; -class AsyncResultSet : public IResultSet, private boost::noncopyable +class AsyncResultSet : public IResultSet, private mapnik::noncopyable { public: AsyncResultSet(postgis_processor_context_ptr const& ctx, boost::shared_ptr< Pool > const& pool, - boost::shared_ptr const &conn, const std::string& sql ) + boost::shared_ptr const& conn, std::string const& sql ) : ctx_(ctx), pool_(pool), conn_(conn), @@ -83,11 +83,11 @@ public: rs_ = conn_->getAsyncResult(); } else - { + { throw mapnik::datasource_exception("invalid connection in AsyncResultSet::next"); } } - + next_res = rs_->next(); if (!next_res) { @@ -172,7 +172,8 @@ private: class postgis_processor_context : public mapnik::IProcessorContext { public: - postgis_processor_context():num_async_requests_(0) {} + postgis_processor_context() + : num_async_requests_(0) {} ~postgis_processor_context() {} void add_request(boost::shared_ptr const& req) @@ -194,8 +195,8 @@ public: int num_async_requests_; private: - typedef std::queue > asynch_queue; - asynch_queue q_; + typedef std::queue > async_queue; + async_queue q_; };