commit | 9aeacf770ac787ff9c06581793cd7138a0725021 | [log] [tgz] |
---|---|---|
author | Lei Zhang <[email protected]> | Wed Apr 07 19:02:01 2021 |
committer | Chromium LUCI CQ <[email protected]> | Wed Apr 07 19:02:01 2021 |
tree | fc8c382c362917620b73187a5c689124e31dc4e4 | |
parent | e48217414fcc7c983dee81513f4cb4fd16c6bb74 [diff] [blame] |
Do not return std::unique_ptr<T>() in various dirs. This is just a convoluted way of writing nullptr, so rewrite it in the simpler form. PRESUBMIT.py already disallows new instances of std::unique_ptr<T>(). This removes existing instances. Change-Id: Iee6f46b016c61a5308f701cfec2d067fe9390a32 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2803679 Reviewed-by: Andrey Kosyakov <[email protected]> Reviewed-by: Xiyuan Xia <[email protected]> Reviewed-by: Sami Kyöstilä <[email protected]> Reviewed-by: Sean Topping <[email protected]> Reviewed-by: Alex Gough <[email protected]> Reviewed-by: Steven Bennetts <[email protected]> Reviewed-by: Victor Costan <[email protected]> Reviewed-by: Sylvain Defresne <[email protected]> Reviewed-by: Lambros Lambrou <[email protected]> Reviewed-by: Guido Urdaneta <[email protected]> Commit-Queue: Lei Zhang <[email protected]> Cr-Commit-Position: refs/heads/master@{#870130}
diff --git a/remoting/host/touch_injector_win.cc b/remoting/host/touch_injector_win.cc index ac434cd..d1f4894 100644 --- a/remoting/host/touch_injector_win.cc +++ b/remoting/host/touch_injector_win.cc
@@ -114,7 +114,7 @@ base::ScopedNativeLibrary library(base::FilePath(L"User32.dll")); if (!library.is_valid()) { PLOG(INFO) << "Failed to get library module for touch injection functions."; - return std::unique_ptr<TouchInjectorWinDelegate>(); + return nullptr; } InitializeTouchInjectionFunction init_func = @@ -122,7 +122,7 @@ library.GetFunctionPointer("InitializeTouchInjection")); if (!init_func) { PLOG(INFO) << "Failed to get InitializeTouchInjection function handle."; - return std::unique_ptr<TouchInjectorWinDelegate>(); + return nullptr; } InjectTouchInputFunction inject_touch_func = @@ -130,7 +130,7 @@ library.GetFunctionPointer("InjectTouchInput")); if (!inject_touch_func) { PLOG(INFO) << "Failed to get InjectTouchInput."; - return std::unique_ptr<TouchInjectorWinDelegate>(); + return nullptr; } return std::unique_ptr<TouchInjectorWinDelegate>(new TouchInjectorWinDelegate(