summaryrefslogtreecommitdiffstats
path: root/js/src/vm/ArrayBufferObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm/ArrayBufferObject.h')
-rw-r--r--js/src/vm/ArrayBufferObject.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/js/src/vm/ArrayBufferObject.h b/js/src/vm/ArrayBufferObject.h
index 6614f5220..e9c9bc0e0 100644
--- a/js/src/vm/ArrayBufferObject.h
+++ b/js/src/vm/ArrayBufferObject.h
@@ -457,8 +457,8 @@ ClampDoubleToUint8(const double x);
struct uint8_clamped {
uint8_t val;
- uint8_clamped() { }
- uint8_clamped(const uint8_clamped& other) : val(other.val) { }
+ uint8_clamped() = default;
+ uint8_clamped(const uint8_clamped& other) = default;
// invoke our assignment helpers for constructor conversion
explicit uint8_clamped(uint8_t x) { *this = x; }
@@ -469,10 +469,7 @@ struct uint8_clamped {
explicit uint8_clamped(int32_t x) { *this = x; }
explicit uint8_clamped(double x) { *this = x; }
- uint8_clamped& operator=(const uint8_clamped& x) {
- val = x.val;
- return *this;
- }
+ uint8_clamped& operator=(const uint8_clamped& x) = default;
uint8_clamped& operator=(uint8_t x) {
val = x;