Permalink
Browse files

apply mapnik_format.el formatting

  • Loading branch information...
1 parent 2b68cea commit 2f10469c8d68ffb8a2c16634d0c7ef14136e83f1 Dane Springmeyer committed Mar 13, 2012
@@ -66,7 +66,7 @@ class MAPNIK_DECL agg_renderer : public feature_style_processor<agg_renderer<T>
void start_layer_processing(layer const& lay, box2d<double> const& query_extent);
void end_layer_processing(layer const& lay);
void render_marker(pixel_position const& pos, marker const& marker, agg::trans_affine const& tr, double opacity);
-
+
void process(point_symbolizer const& sym,
mapnik::feature_ptr const& feature,
proj_transform const& prj_trans);
@@ -41,7 +41,7 @@ class MAPNIK_DECL color_factory : boost::noncopyable
static void init_from_string(color & c, std::string const& css_color);
static bool parse_from_string(color & c, std::string const& css_color,
- mapnik::css_color_grammar<std::string::const_iterator> const& g);
+ mapnik::css_color_grammar<std::string::const_iterator> const& g);
static color from_string(std::string const& css_color);
};
@@ -229,15 +229,15 @@ struct expression_grammar : qi::grammar<Iterator, expr_node(), space_type>
("\\r", '\r')("\\t", '\t')("\\v", '\v')("\\\\", '\\')
("\\\'", '\'')("\\\"", '\"')
;
-
+
#if BOOST_VERSION > 104500
quote_char %= char_('\'') | char_('"');
ustring %= omit[quote_char[_a = _1]]
>> *(unesc_char | "\\x" >> hex | (char_ - lit(_a)))
>> lit(_a);
attr %= '[' >> no_skip[+~char_(']')] >> ']';
#else
- ustring %= lit('\'')
+ ustring %= lit('\'')
>> *(unesc_char | "\\x" >> hex | (char_ - lit('\'')))
>> lit('\'');
attr %= '[' >> lexeme[+(char_ - ']')] >> ']';
View
@@ -99,11 +99,11 @@ class MAPNIK_DECL feature_impl : private boost::noncopyable
feature_impl(context_ptr const& ctx, int id)
: id_(id),
- ctx_(ctx),
- data_(ctx_->mapping_.size()),
- geom_cont_(),
- raster_()
- {}
+ ctx_(ctx),
+ data_(ctx_->mapping_.size()),
+ geom_cont_(),
+ raster_()
+ {}
inline int id() const { return id_;}
@@ -163,25 +163,25 @@ class MAPNIK_DECL feature_impl : private boost::noncopyable
{
context_type::map_type::const_iterator itr = ctx_->mapping_.find(key);
if (itr != ctx_->mapping_.end())
- return get(itr->second);
- else
- throw std::out_of_range(std::string("Key does not exist: '") + key + "'");
+ return get(itr->second);
+ else
+ throw std::out_of_range(std::string("Key does not exist: '") + key + "'");
}
-
+
value_type const& get(std::size_t index) const
{
if (index < data_.size())
return data_[index];
throw std::out_of_range("Index out of range");
}
-
+
boost::optional<value_type const&> get_optional(std::size_t index) const
{
if (index < data_.size())
return boost::optional<value_type const&>(data_[index]);
return boost::optional<value_type const&>();
}
-
+
std::size_t size() const
{
return data_.size();
@@ -273,7 +273,7 @@ class MAPNIK_DECL feature_impl : private boost::noncopyable
if (index < data_.size())
{
ss << " " << itr->first << ":" << data_[itr->second] << std::endl;
- }
+ }
}
ss << ")" << std::endl;
return ss.str();
@@ -153,7 +153,7 @@ class MAPNIK_DECL font_face_set : private boost::noncopyable
public:
font_face_set(void)
: faces_(),
- dimension_cache_() {}
+ dimension_cache_() {}
void add(face_ptr face)
{
@@ -41,7 +41,7 @@ namespace formatting
typedef node_ptr (*from_xml_function_ptr)(xml_node const& xml);
class registry : public singleton<registry, CreateStatic>,
- private boost::noncopyable
+ private boost::noncopyable
{
public:
registry();
@@ -390,7 +390,7 @@ class geometry : private::boost::noncopyable
}
return false;
}
-
+
};
typedef geometry<double,vertex_vector> geometry_type;
@@ -160,7 +160,7 @@ class hextree : private boost::noncopyable
~hextree()
{}
-
+
void setMaxColors(unsigned max_colors)
{
max_colors_ = max_colors;
@@ -335,7 +335,7 @@ class hextree : private boost::noncopyable
sorted_pal_.reserve(colors_);
create_palette_rek(sorted_pal_, root_.get());
-
+
// sort palette for binary searching in quantization
#if BOOST_VERSION >= 104600
boost::sort(sorted_pal_, rgba::mean_sort_cmp());
@@ -3,7 +3,7 @@
#include <mapnik/xml_node.hpp>
/* Debug dump ptree XML representation.
-*/
+ */
void dump_xml(xml_node const& xml, unsigned level=0)
{
std::string indent;
@@ -124,16 +124,16 @@ class placement_finder : boost::noncopyable
text_symbolizer_properties const& p;
text_placement_info const& pi;
/** Length of the longest line after linebreaks.
- * Before find_line_breaks() this is the total length of the string.
- */
+ * Before find_line_breaks() this is the total length of the string.
+ */
double string_width_;
/** Height of the string after linebreaks.
- * Before find_line_breaks() this is the total length of the string.
- */
+ * Before find_line_breaks() this is the total length of the string.
+ */
double string_height_;
/** Height of the tallest font in the first line not including line spacing.
- * Used to determine the correct offset for the first line.
- */
+ * Used to determine the correct offset for the first line.
+ */
double first_line_space_;
vertical_alignment_e valign_;
horizontal_alignment_e halign_;
@@ -42,7 +42,7 @@ typedef text_placements_ptr (*from_xml_function_ptr)(
xml_node const& xml, fontset_map const & fontsets);
class registry : public singleton<registry, CreateStatic>,
- private boost::noncopyable
+ private boost::noncopyable
{
public:
registry();
@@ -30,16 +30,16 @@
namespace mapnik { namespace conversions {
-bool string2int(const char * value, int & result);
-bool string2int(std::string const& value, int & result);
-
-bool string2double(std::string const& value, double & result);
-bool string2double(const char * value, double & result);
-
-bool string2float(std::string const& value, float & result);
-bool string2float(const char * value, float & result);
+ bool string2int(const char * value, int & result);
+ bool string2int(std::string const& value, int & result);
-}
+ bool string2double(std::string const& value, double & result);
+ bool string2double(const char * value, double & result);
+
+ bool string2float(std::string const& value, float & result);
+ bool string2float(const char * value, float & result);
+
+ }
}
#endif // MAPNIK_CONVERSIONS_UTIL_HPP
@@ -55,16 +55,16 @@ class vertex_vector : private boost::noncopyable
// required for iterators support
typedef boost::tuple<unsigned,coord_type,coord_type> value_type;
typedef std::size_t size_type;
-
+
private:
unsigned num_blocks_;
unsigned max_blocks_;
coord_type** vertices_;
unsigned char** commands_;
size_type pos_;
-
+
public:
-
+
vertex_vector()
: num_blocks_(0),
max_blocks_(0),
@@ -114,7 +114,7 @@ class vertex_vector : private boost::noncopyable
*y = (*vertex);
return commands_[block] [pos & block_mask];
}
-
+
private:
void allocate_block(unsigned block)
{

0 comments on commit 2f10469

Please sign in to comment.