From 68ff49d429a8d7ba3939d28a0a0be7c74a651b48 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 15 Jun 2010 12:27:26 +0000 Subject: [PATCH] + untabify --- demo/viewer/main.cpp | 80 ++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/demo/viewer/main.cpp b/demo/viewer/main.cpp index fa99624a6..969ad8334 100644 --- a/demo/viewer/main.cpp +++ b/demo/viewer/main.cpp @@ -35,46 +35,46 @@ bool is_font_file (std::string const& filename) int main( int argc, char **argv ) { - using mapnik::datasource_cache; - using mapnik::freetype_engine; - - // modify this prefix based on your install location - std::string mapnik_dir = "/opt/mapnik"; - - datasource_cache::instance()->register_datasources(mapnik_dir + "/lib/mapnik2/input"); - boost::filesystem::path path(mapnik_dir + "/lib/mapnik2/fonts"); - boost::filesystem::directory_iterator end_itr; + using mapnik::datasource_cache; + using mapnik::freetype_engine; + + // modify this prefix based on your install location + std::string mapnik_dir = "/opt/mapnik"; + + datasource_cache::instance()->register_datasources(mapnik_dir + "/lib/mapnik2/input"); + boost::filesystem::path path(mapnik_dir + "/lib/mapnik2/fonts"); + boost::filesystem::directory_iterator end_itr; - if (boost::filesystem::exists(path) && boost::filesystem::is_directory(path)) - { - for (boost::filesystem::directory_iterator itr(path);itr!=end_itr;++itr ) - { - if (!boost::filesystem::is_directory(*itr) && is_font_file(itr->path().leaf())) - { - std::cout << "register font " << itr->string() << "\n"; - freetype_engine::register_font(itr->string()); - } - } - } - - QApplication app( argc, argv ); - MainWindow window; - window.show(); - if (argc > 1) window.open(argv[1]); - if (argc == 3) - { - QStringList list = QString(argv[2]).split(","); - if (list.size()==4) - { - bool ok; - double x0 = list[0].toDouble(&ok); - double y0 = list[1].toDouble(&ok); - double x1 = list[2].toDouble(&ok); - double y1 = list[3].toDouble(&ok); - if (ok) window.set_default_extent(x0,y0,x1,y1); - } - } - - return app.exec(); + if (boost::filesystem::exists(path) && boost::filesystem::is_directory(path)) + { + for (boost::filesystem::directory_iterator itr(path);itr!=end_itr;++itr ) + { + if (!boost::filesystem::is_directory(*itr) && is_font_file(itr->path().leaf())) + { + std::cout << "register font " << itr->string() << "\n"; + freetype_engine::register_font(itr->string()); + } + } + } + + QApplication app( argc, argv ); + MainWindow window; + window.show(); + if (argc > 1) window.open(argv[1]); + if (argc == 3) + { + QStringList list = QString(argv[2]).split(","); + if (list.size()==4) + { + bool ok; + double x0 = list[0].toDouble(&ok); + double y0 = list[1].toDouble(&ok); + double x1 = list[2].toDouble(&ok); + double y1 = list[3].toDouble(&ok); + if (ok) window.set_default_extent(x0,y0,x1,y1); + } + } + + return app.exec(); }