forked from mia/Aegisub
Don't use emplace_back for wxDataViewItemArray since it doesn't work in non-STL builds
This commit is contained in:
parent
e0ce2962cf
commit
56993f7f5e
2 changed files with 8 additions and 7 deletions
|
@ -38,6 +38,7 @@
|
|||
#include <deque>
|
||||
#endif
|
||||
|
||||
#include <boost/range/algorithm/copy.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/range/adaptor/sliced.hpp>
|
||||
|
||||
|
@ -443,7 +444,7 @@ void AudioTimingControllerKaraoke::OnMarkerDrag(std::vector<AudioMarker*> const&
|
|||
}
|
||||
|
||||
void AudioTimingControllerKaraoke::GetLabels(TimeRange const& range, std::vector<AudioLabel> &out) const {
|
||||
push_back(out, labels | boost::adaptors::filtered([&](AudioLabel const& l) {
|
||||
copy(labels | boost::adaptors::filtered([&](AudioLabel const& l) {
|
||||
return range.overlaps(l.range);
|
||||
}));
|
||||
}), back_inserter(out));
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ public:
|
|||
|
||||
wxDataViewItem AddChild(Combo const& combo) {
|
||||
children.emplace_back(this, combo);
|
||||
visible_items.emplace_back(&children.back());
|
||||
visible_items.push_back(wxDataViewItem(&children.back()));
|
||||
model->ItemAdded(wxDataViewItem(this), wxDataViewItem(&children.back()));
|
||||
return wxDataViewItem(&children.back());
|
||||
}
|
||||
|
@ -183,11 +183,11 @@ public:
|
|||
bool is_visible = combo.IsVisible(new_filter);
|
||||
|
||||
if (is_visible)
|
||||
visible_items.emplace_back(&combo);
|
||||
visible_items.push_back(wxDataViewItem(&combo));
|
||||
if (was_visible && !is_visible)
|
||||
removed.emplace_back(&combo);
|
||||
removed.push_back(wxDataViewItem(&combo));
|
||||
if (is_visible && !was_visible)
|
||||
added.emplace_back(&combo);
|
||||
added.push_back(wxDataViewItem(&combo));
|
||||
}
|
||||
|
||||
if (!added.empty())
|
||||
|
@ -260,7 +260,7 @@ public:
|
|||
unsigned int GetChildren(wxDataViewItemArray &out) const {
|
||||
out.reserve(categories.size());
|
||||
for (auto const& category : categories)
|
||||
out.emplace_back((void*)&category);
|
||||
out.push_back(wxDataViewItem((void*)&category));
|
||||
return out.size();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue