mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
85 lines
3.5 KiB
Diff
85 lines
3.5 KiB
Diff
|
From 0aeaee3dd895eda3953d35193756724d3235c0bf Mon Sep 17 00:00:00 2001
|
||
|
From: Jose Dapena Paz <jose.dapena@lge.com>
|
||
|
Date: Tue, 6 Mar 2018 02:13:13 +0000
|
||
|
Subject: [PATCH 5/7] GCC: explicitely std::move to base::Optional instead of
|
||
|
implicit conversion to base::Optional in return
|
||
|
|
||
|
GCC 7.2/7.3 complains in this pattern of code:
|
||
|
base::Optional<Foo>
|
||
|
Method() {
|
||
|
...
|
||
|
Foo response;
|
||
|
...
|
||
|
return response;
|
||
|
}
|
||
|
|
||
|
It seems it cannot properly resolve the implicit move to base::Optional, and
|
||
|
ends up failing to compile. To avoid that, this change explicitely moves to
|
||
|
base::Optional as return value:
|
||
|
return base::Optional<Foo>(std::move(response));
|
||
|
|
||
|
Change-Id: Ic0390e1c31340dc34a71bb4175bd63a4631248d6
|
||
|
Reviewed-on: https://chromium-review.googlesource.com/944402
|
||
|
Commit-Queue: Victor Costan <pwnall@chromium.org>
|
||
|
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
|
||
|
Reviewed-by: Victor Costan <pwnall@chromium.org>
|
||
|
Reviewed-by: Reilly Grant <reillyg@chromium.org>
|
||
|
Cr-Commit-Position: refs/heads/master@{#541029}
|
||
|
---
|
||
|
content/browser/appcache/appcache_request_handler.cc | 2 +-
|
||
|
.../service_worker_controllee_request_handler.cc | 2 +-
|
||
|
device/fido/device_response_converter.cc | 4 ++--
|
||
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/content/browser/appcache/appcache_request_handler.cc b/content/browser/appcache/appcache_request_handler.cc
|
||
|
index 63cc984b4276..ff638ab56571 100644
|
||
|
--- a/content/browser/appcache/appcache_request_handler.cc
|
||
|
+++ b/content/browser/appcache/appcache_request_handler.cc
|
||
|
@@ -639,7 +639,7 @@ AppCacheRequestHandler::MaybeCreateSubresourceLoaderParams() {
|
||
|
|
||
|
SubresourceLoaderParams params;
|
||
|
params.loader_factory_info = factory_ptr.PassInterface();
|
||
|
- return params;
|
||
|
+ return base::Optional<SubresourceLoaderParams>(std::move(params));
|
||
|
}
|
||
|
|
||
|
void AppCacheRequestHandler::MaybeCreateSubresourceLoader(
|
||
|
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc
|
||
|
index 2ed0c353cad3..5b09f6d670c4 100644
|
||
|
--- a/content/browser/service_worker/service_worker_controllee_request_handler.cc
|
||
|
+++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
|
||
|
@@ -271,7 +271,7 @@ ServiceWorkerControlleeRequestHandler::MaybeCreateSubresourceLoaderParams() {
|
||
|
controller_info->object_info = provider_host_->GetOrCreateServiceWorkerHandle(
|
||
|
provider_host_->controller());
|
||
|
params.controller_service_worker_info = std::move(controller_info);
|
||
|
- return params;
|
||
|
+ return base::Optional<SubresourceLoaderParams>(std::move(params));
|
||
|
}
|
||
|
|
||
|
void ServiceWorkerControlleeRequestHandler::PrepareForMainResource(
|
||
|
diff --git a/device/fido/device_response_converter.cc b/device/fido/device_response_converter.cc
|
||
|
index 050ff2fc5d10..096f9f44872b 100644
|
||
|
--- a/device/fido/device_response_converter.cc
|
||
|
+++ b/device/fido/device_response_converter.cc
|
||
|
@@ -121,7 +121,7 @@ base::Optional<AuthenticatorGetAssertionResponse> ReadCTAPGetAssertionResponse(
|
||
|
response.SetNumCredentials(it->second.GetUnsigned());
|
||
|
}
|
||
|
|
||
|
- return response;
|
||
|
+ return base::Optional<AuthenticatorGetAssertionResponse>(std::move(response));
|
||
|
}
|
||
|
|
||
|
base::Optional<AuthenticatorGetInfoResponse> ReadCTAPGetInfoResponse(
|
||
|
@@ -241,7 +241,7 @@ base::Optional<AuthenticatorGetInfoResponse> ReadCTAPGetInfoResponse(
|
||
|
response.SetPinProtocols(std::move(supported_pin_protocols));
|
||
|
}
|
||
|
|
||
|
- return response;
|
||
|
+ return base::Optional<AuthenticatorGetInfoResponse>(std::move(response));
|
||
|
}
|
||
|
|
||
|
} // namespace device
|
||
|
--
|
||
|
2.17.0
|
||
|
|