1From 91fe99136cd57a8eab9c076e4e1699767bcac3fa Mon Sep 17 00:00:00 2001 2From: Hans Wennborg <[email protected]> 3Date: Tue, 2 Oct 2018 16:25:34 +0000 4Subject: [PATCH] Fix -Wdefaulted-function-deleted warning in 5 MessageLoopCurrent 6 7The new Clang warning points out that the class can't be copy 8assigned because the current_ member is const. Copy or move 9constructing it is fine though, and that's all that's needed. 10 11Bug: 890307 12Change-Id: I3f4d5e69485b84166ba4dd2356cc7973a5e58da6 13Reviewed-on: https://chromium-review.googlesource.com/1255613 14Reviewed-by: Daniel Cheng <[email protected]> 15Cr-Commit-Position: refs/heads/master@{#595867} 16--- 17 base/message_loop/message_loop_current.h | 4 ++-- 18 1 file changed, 2 insertions(+), 2 deletions(-) 19 20diff --git a/base/message_loop/message_loop_current.h b/base/message_loop/message_loop_current.h 21index d623cbc7f7b2..403d0dcc2ddb 100644 22--- a/base/message_loop/message_loop_current.h 23+++ b/base/message_loop/message_loop_current.h 24@@ -38,9 +38,9 @@ class MessageLoop; 25 class BASE_EXPORT MessageLoopCurrent { 26 public: 27 // MessageLoopCurrent is effectively just a disguised pointer and is fine to 28- // copy around. 29+ // copy/move around. 30 MessageLoopCurrent(const MessageLoopCurrent& other) = default; 31- MessageLoopCurrent& operator=(const MessageLoopCurrent& other) = default; 32+ MessageLoopCurrent(MessageLoopCurrent&& other) = default; 33 34 // Returns a proxy object to interact with the MessageLoop running the 35 // current thread. It must only be used on the thread it was obtained. 36-- 372.22.0.rc2.383.gf4fbbf30c2-goog 38 39