diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-09-21 10:33:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-21 10:33:54 +0200 |
commit | 3c04affe204870cef155a50efff39460e274390c (patch) | |
tree | 01ac0e88c6bd22a9e2b96345c1d9b6d4eac6be19 /js/src/vm/ArrayBufferObject.h | |
parent | 07a50b5c52eddfcc74db9d200b4a2c8f851c3e92 (diff) | |
parent | 3b362e9ded0e79c86db239bed536465745c2278a (diff) | |
download | UXP-3c04affe204870cef155a50efff39460e274390c.tar UXP-3c04affe204870cef155a50efff39460e274390c.tar.gz UXP-3c04affe204870cef155a50efff39460e274390c.tar.lz UXP-3c04affe204870cef155a50efff39460e274390c.tar.xz UXP-3c04affe204870cef155a50efff39460e274390c.zip |
Merge pull request #782 from trav90/class-memaccess-errors
Fix more -Wclass-memaccess warnings (part 3)
Diffstat (limited to 'js/src/vm/ArrayBufferObject.h')
-rw-r--r-- | js/src/vm/ArrayBufferObject.h | 9 |
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; |