Chromium Code Reviews| Index: base/version.cc |
| diff --git a/base/version.cc b/base/version.cc |
| index 02213fbf158ed56179dacf3288ab0f58bcf95c0b..31a40daa6d4ecdba54c3ea66d142b1ae2d93b256 100644 |
| --- a/base/version.cc |
| +++ b/base/version.cc |
| @@ -93,6 +93,19 @@ Version::Version(const std::string& version_str) { |
| components_.swap(parsed); |
| } |
| +Version::Version(std::vector<uint32_t>&& components) |
| + : components_(components) {} |
| + |
| +Version& Version::operator=(Version&& other) { |
|
danakj
2016/07/19 20:50:07
can you just use =
default?
Alex Z.
2016/07/22 13:28:03
Done.
|
| + components_ = std::move(other.components_); |
| + return *this; |
| +} |
| + |
| +Version& Version::operator=(const Version& other) { |
|
danakj
2016/07/19 20:50:07
ditto, =default?
Alex Z.
2016/07/22 13:28:03
Done.
|
| + components_ = other.components_; |
| + return *this; |
| +} |
| + |
| bool Version::IsValid() const { |
| return (!components_.empty()); |
| } |