Skip to content

Commit 5efc81c

Browse files
committed
Type hints for old compilers' benefit
1 parent 29f78b0 commit 5efc81c

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/LoadStoreChunk.cpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ namespace core
117117
-> auxiliary::DeferredFuture<std::shared_ptr<T>>
118118
{
119119
auto res = m_rc.loadChunkAllocate_impl<T>(storeChunkConfig());
120-
return auxiliary::DeferredFuture(std::packaged_task(
121-
[res_lambda = std::move(res), rc = m_rc]() mutable {
122-
rc.seriesFlush();
123-
return res_lambda;
124-
}));
120+
return auxiliary::DeferredFuture<std::shared_ptr<T>>(
121+
std::packaged_task<std::shared_ptr<T>()>(
122+
[res_lambda = std::move(res), rc = m_rc]() mutable {
123+
rc.seriesFlush();
124+
return res_lambda;
125+
}));
125126
}
126127

127128
template <typename T>
@@ -147,12 +148,15 @@ namespace core
147148
auxiliary::detail::shared_ptr_dataset_types>
148149
{
149150
auto res = rc.loadChunkAllocate_impl<T>(std::move(cfg));
150-
return auxiliary::DeferredFuture(std::packaged_task(
151-
[res_lambda = std::move(res), rc_lambda = rc]() mutable
152-
-> auxiliary::detail::shared_ptr_dataset_types {
153-
rc_lambda.seriesFlush();
154-
return res_lambda;
155-
}));
151+
return auxiliary::DeferredFuture<
152+
auxiliary::detail::shared_ptr_dataset_types>(
153+
std::packaged_task<
154+
auxiliary::detail::shared_ptr_dataset_types()>(
155+
[res_lambda = std::move(res), rc_lambda = rc]() mutable
156+
-> auxiliary::detail::shared_ptr_dataset_types {
157+
rc_lambda.seriesFlush();
158+
return res_lambda;
159+
}));
156160
}
157161
};
158162

@@ -210,7 +214,7 @@ namespace core
210214
asWriteBuffer(std::move(m_buffer)),
211215
determineDatatype<auxiliary::IsPointer_t<Ptr_Type>>(),
212216
storeChunkConfig());
213-
return auxiliary::DeferredFuture(std::packaged_task(
217+
return auxiliary::DeferredFuture<void>(std::packaged_task<void()>(
214218
[rc_lambda = m_rc]() mutable -> void { rc_lambda.seriesFlush(); }));
215219
}
216220

0 commit comments

Comments
 (0)