From 8478fdc217c31b4aa8d20bffe1a47d1967330ed5 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 21 May 2013 12:55:08 -0700 Subject: [PATCH] fix boolean check to be easier to read --- plugins/input/csv/csv_datasource.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index 403f8f9ee..e1478cd36 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -126,7 +126,9 @@ csv_datasource::csv_datasource(parameters const& params) std::ifstream in(filename_.c_str(),std::ios_base::in | std::ios_base::binary); #endif if (!in.is_open()) + { throw mapnik::datasource_exception("CSV Plugin: could not open: '" + filename_ + "'"); + } parse_csv(in,escape_, separator_, quote_); in.close(); } @@ -864,7 +866,7 @@ void csv_datasource::parse_csv(T & stream, } } } - if (!feature_count > 0) + if (feature_count < 1) { MAPNIK_LOG_ERROR(csv) << "CSV Plugin: could not parse any lines of data"; }