Skip to content

Commit

Permalink
improve type reference
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSylvester committed Dec 2, 2024
1 parent 90c6a0b commit c7f4dea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platform/default/src/mbgl/storage/online_file_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ constexpr const char* ONLINE_STATUS_KEY = "online-status";
class OnlineFileSourceThread;

struct OnlineFileRequest {
using Callback = std::function<void(Response)>;
using Callback = FileSource::CopyableCallback<void(Response)>;

OnlineFileRequest(Resource resource_, Callback callback_, OnlineFileSourceThread& impl_);
OnlineFileRequest(Resource resource_, Callback&& callback_, OnlineFileSourceThread& impl_);
~OnlineFileRequest();

void networkIsReachableAgain();
Expand Down Expand Up @@ -429,7 +429,7 @@ class OnlineFileSource::Impl {
const std::unique_ptr<util::Thread<OnlineFileSourceThread>> thread;
};

OnlineFileRequest::OnlineFileRequest(Resource resource_, Callback callback_, OnlineFileSourceThread& impl_)
OnlineFileRequest::OnlineFileRequest(Resource resource_, Callback&& callback_, OnlineFileSourceThread& impl_)
: impl(impl_),
resource(std::move(resource_)),
callback(std::move(callback_)) {
Expand Down

0 comments on commit c7f4dea

Please sign in to comment.