void-packages/srcpkgs/nss/patches/cpputil-databuffer.patch
Đoàn Trần Công Danh 21d3be13d6 nss: update to 3.76.
2022-03-17 08:24:17 +07:00

20 lines
593 B
Diff

Source: https://bugzilla.mozilla.org/show_bug.cgi?id=1758478
diff --git a/nss/cpputil/databuffer.h b/nss/cpputil/databuffer.h
index 8d34e1a..6aee509 100644
--- a/nss/cpputil/databuffer.h
+++ b/nss/cpputil/databuffer.h
@@ -33,11 +33,9 @@ class DataBuffer {
return *this;
}
DataBuffer& operator=(DataBuffer&& other) {
- if (this == &other) {
- data_ = other.data_;
- len_ = other.len_;
- other.data_ = nullptr;
- other.len_ = 0;
+ if (this != &other) {
+ std::swap(data_, other.data_);
+ std::swap(len_, other.len_);
}
return *this;
}