mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
C++ FilterModel: Fix mix of unique_ptr and shared_ptr
The inner is sorted in a shared_ptr and should be created using make_shared.
This commit is contained in:
parent
56983482b9
commit
388cf32770
1 changed files with 1 additions and 1 deletions
|
@ -952,7 +952,7 @@ public:
|
|||
/// FilterModel.
|
||||
FilterModel(std::shared_ptr<Model<ModelData>> source_model,
|
||||
std::function<bool(const ModelData &)> filter_fn)
|
||||
: inner(std::make_unique<private_api::FilterModelInner<ModelData>>(
|
||||
: inner(std::make_shared<private_api::FilterModelInner<ModelData>>(
|
||||
std::move(source_model), std::move(filter_fn), *this))
|
||||
{
|
||||
inner->source_model->attach_peer(inner);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue