+ more const correctness
This commit is contained in:
parent
35ab93667f
commit
8cf9a5a082
8 changed files with 11 additions and 11 deletions
|
@ -110,7 +110,7 @@ public:
|
|||
virtual void add_box(box2d<double> const& box, Feature const& feature,
|
||||
CoordTransform const& t,
|
||||
metawriter_properties const& properties)=0;
|
||||
virtual void add_text(boost::ptr_vector<text_path> &placements,
|
||||
virtual void add_text(boost::ptr_vector<text_path> const& placements,
|
||||
box2d<double> const& extents,
|
||||
Feature const& feature,
|
||||
CoordTransform const& t,
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
virtual void add_box(box2d<double> const& box, Feature const& feature,
|
||||
CoordTransform const& t,
|
||||
metawriter_properties const& properties);
|
||||
virtual void add_text(boost::ptr_vector<text_path> &placements,
|
||||
virtual void add_text(boost::ptr_vector<text_path> const& placements,
|
||||
box2d<double> const& extents,
|
||||
Feature const& feature,
|
||||
CoordTransform const& t,
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
virtual void add_box(box2d<double> const& box, Feature const& feature,
|
||||
CoordTransform const& t,
|
||||
metawriter_properties const& properties);
|
||||
virtual void add_text(boost::ptr_vector<text_path> &placements,
|
||||
virtual void add_text(boost::ptr_vector<text_path> const& placements,
|
||||
box2d<double> const& extents,
|
||||
Feature const& feature,
|
||||
CoordTransform const& t,
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
/** Remove old placements. */
|
||||
void clear_placements();
|
||||
|
||||
inline placements_type &get_results() { return placements_; }
|
||||
inline placements_type const& get_results() { return placements_; }
|
||||
|
||||
/** Additional boxes to take into account when finding placement.
|
||||
* Used for finding line placements where multiple placements are returned.
|
||||
|
|
|
@ -85,7 +85,7 @@ public:
|
|||
bool next();
|
||||
|
||||
/** Get current placement. next() has to be called before! */
|
||||
placements_type & placements() const;
|
||||
placements_type const& placements() const;
|
||||
protected:
|
||||
bool next_point_placement();
|
||||
bool next_line_placement();
|
||||
|
|
|
@ -177,7 +177,7 @@ void metawriter_json_stream::add_box(box2d<double> const &box, Feature const& fe
|
|||
}
|
||||
|
||||
void metawriter_json_stream::add_text(
|
||||
boost::ptr_vector<text_path> &placements, box2d<double> const& extents,
|
||||
boost::ptr_vector<text_path> const& placements, box2d<double> const& extents,
|
||||
Feature const& feature, CoordTransform const& t,
|
||||
metawriter_properties const& properties)
|
||||
{
|
||||
|
@ -195,14 +195,15 @@ void metawriter_json_stream::add_text(
|
|||
*/
|
||||
for (unsigned n = 0; n < placements.size(); n++)
|
||||
{
|
||||
text_path ¤t_placement = placements[n];
|
||||
text_path const& current_placement = placements[n];
|
||||
|
||||
bool inside = false; /* Part of text is inside rendering region */
|
||||
bool straight = true;
|
||||
char_info_ptr c;
|
||||
double x, y, angle;
|
||||
current_placement.rewind();
|
||||
for (int i = 0; i < current_placement.num_nodes(); ++i) {
|
||||
for (int i = 0; i < current_placement.num_nodes(); ++i)
|
||||
{
|
||||
int cx = current_placement.center.x;
|
||||
int cy = current_placement.center.y;
|
||||
current_placement.vertex(&c, &x, &y, &angle);
|
||||
|
|
|
@ -71,7 +71,7 @@ metawriter_inmem::add_box(box2d<double> const& box, Feature const& feature,
|
|||
|
||||
void
|
||||
metawriter_inmem::add_text(
|
||||
boost::ptr_vector<text_path> & /*text*/,
|
||||
boost::ptr_vector<text_path> const& /*text*/,
|
||||
box2d<double> const& extents,
|
||||
Feature const& feature,
|
||||
CoordTransform const& /*t*/,
|
||||
|
@ -146,4 +146,3 @@ metawriter_inmem::inst_end() const {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ bool text_symbolizer_helper<FaceManagerT, DetectorT>::next_placement()
|
|||
}
|
||||
|
||||
template <typename FaceManagerT, typename DetectorT>
|
||||
placements_type &text_symbolizer_helper<FaceManagerT, DetectorT>::placements() const
|
||||
placements_type const& text_symbolizer_helper<FaceManagerT, DetectorT>::placements() const
|
||||
{
|
||||
return finder_->get_results();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue