can't store noncopyable list in std::vector
std::list can have a throwing move constructor. std::vector of such lists makes copies when growing its storage array, it doesn't move them. render_thunk_list is noncopyable (because render_thunk is noncopyable), and so can't be stored in std::vector in some STL implementations.
This commit is contained in:
parent
962bcf84c5
commit
ca89c587bd
1 changed files with 5 additions and 3 deletions
|
@ -66,7 +66,7 @@ void render_group_symbolizer(group_symbolizer const& sym,
|
|||
|
||||
// keep track of which lists of render thunks correspond to
|
||||
// entries in the group_layout_manager.
|
||||
std::vector<render_thunk_list> layout_thunks;
|
||||
std::list<render_thunk_list> layout_thunks;
|
||||
|
||||
// layout manager to store and arrange bboxes of matched features
|
||||
group_layout_manager layout_manager(props->get_layout());
|
||||
|
@ -182,11 +182,13 @@ void render_group_symbolizer(group_symbolizer const& sym,
|
|||
pixel_position_list const& positions = helper.get();
|
||||
for (pixel_position const& pos : positions)
|
||||
{
|
||||
for (size_t layout_i = 0; layout_i < layout_thunks.size(); ++layout_i)
|
||||
size_t layout_i = 0;
|
||||
for (auto const& thunks : layout_thunks)
|
||||
{
|
||||
pixel_position const& offset = layout_manager.offset_at(layout_i);
|
||||
pixel_position render_offset = pos + offset;
|
||||
render_thunks.render_list(layout_thunks[layout_i], render_offset);
|
||||
render_thunks.render_list(thunks, render_offset);
|
||||
++layout_i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue