diff options
| -rw-r--r-- | src/common/logging/backend.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h index c1f4d08e4..795d42ebd 100644 --- a/src/common/logging/backend.h +++ b/src/common/logging/backend.h | |||
| @@ -27,25 +27,9 @@ struct Entry { | |||
| 27 | std::string message; | 27 | std::string message; |
| 28 | 28 | ||
| 29 | Entry() = default; | 29 | Entry() = default; |
| 30 | Entry(Entry&& o) = default; | ||
| 30 | 31 | ||
| 31 | // TODO(yuriks) Use defaulted move constructors once MSVC supports them | 32 | Entry& operator=(Entry&& o) = default; |
| 32 | #define MOVE(member) member(std::move(o.member)) | ||
| 33 | Entry(Entry&& o) | ||
| 34 | : MOVE(timestamp), MOVE(log_class), MOVE(log_level), | ||
| 35 | MOVE(location), MOVE(message) | ||
| 36 | {} | ||
| 37 | #undef MOVE | ||
| 38 | |||
| 39 | Entry& operator=(const Entry&& o) { | ||
| 40 | #define MOVE(member) member = std::move(o.member) | ||
| 41 | MOVE(timestamp); | ||
| 42 | MOVE(log_class); | ||
| 43 | MOVE(log_level); | ||
| 44 | MOVE(location); | ||
| 45 | MOVE(message); | ||
| 46 | #undef MOVE | ||
| 47 | return *this; | ||
| 48 | } | ||
| 49 | }; | 33 | }; |
| 50 | 34 | ||
| 51 | /** | 35 | /** |