diff options
| author | 2016-02-04 20:39:36 -0800 | |
|---|---|---|
| committer | 2016-02-04 20:39:36 -0800 | |
| commit | 7400100da72239979c90a5748a2dfddeb2b1d30a (patch) | |
| tree | c5578b5d591ebd6b97b80b0a4f97bdb37888c864 /src | |
| parent | Merge pull request #1387 from lioncash/func (diff) | |
| parent | backend: defaulted move constructor/assignment (diff) | |
| download | yuzu-7400100da72239979c90a5748a2dfddeb2b1d30a.tar.gz yuzu-7400100da72239979c90a5748a2dfddeb2b1d30a.tar.xz yuzu-7400100da72239979c90a5748a2dfddeb2b1d30a.zip | |
Merge pull request #1392 from lioncash/move
backend: defaulted move constructor/assignment
Diffstat (limited to 'src')
| -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 | /** |