cleaner approach to a compile time magic alpha number for grid buffers

This commit is contained in:
Dane Springmeyer 2012-06-25 17:57:52 -07:00
parent b71553682b
commit 98753db9fd
3 changed files with 2 additions and 33 deletions

View file

@ -45,6 +45,7 @@
#include <string> #include <string>
#include <cassert> #include <cassert>
#include <vector> #include <vector>
#include <boost/integer_traits.hpp>
namespace mapnik namespace mapnik
{ {
@ -60,7 +61,7 @@ public:
typedef std::map<value_type, lookup_type> feature_key_type; typedef std::map<value_type, lookup_type> feature_key_type;
typedef std::map<lookup_type, value_type> key_type; typedef std::map<lookup_type, value_type> key_type;
typedef std::map<lookup_type, mapnik::feature_ptr> feature_type; typedef std::map<lookup_type, mapnik::feature_ptr> feature_type;
static const value_type base_mask; static const value_type base_mask = boost::integer_traits<value_type>::const_min;
private: private:
unsigned width_; unsigned width_;

View file

@ -260,7 +260,6 @@ if env['RUNTIME_LINK'] == "static":
# grid backend # grid backend
source += Split( source += Split(
""" """
grid/grid.cpp
grid/grid_renderer.cpp grid/grid_renderer.cpp
grid/process_building_symbolizer.cpp grid/process_building_symbolizer.cpp
grid/process_line_pattern_symbolizer.cpp grid/process_line_pattern_symbolizer.cpp

View file

@ -1,31 +0,0 @@
/*****************************************************************************
*
* This file is part of Mapnik (c++ mapping toolkit)
*
* Copyright (C) 2012 Artem Pavlenko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*****************************************************************************/
// mapnik
#include <mapnik/grid/grid.hpp>
namespace mapnik
{
template<> const grid::value_type grid::base_mask = std::numeric_limits<int>::min();
}