]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[contrib][pzstd] Fix build issue with gcc-5 2889/head
authorNick Terrell <terrelln@fb.com>
Wed, 1 Dec 2021 02:26:11 +0000 (18:26 -0800)
committerNick Terrell <terrelln@fb.com>
Wed, 1 Dec 2021 02:29:02 +0000 (18:29 -0800)
gcc-5 didn't like the l-value overload for defaulted operator=. There is
no reason it needs to be l-value overloaded, so just remove it.

I'm not sure why the build broke for @mckaygerhard in Issue #2811, since
this code hasn't changed since it was added. But, there is no harm in
fixing it.

Fixes issue #2811.

contrib/pzstd/utils/Buffer.h
contrib/pzstd/utils/Range.h

index f69c3b4d9f7abd9d293d0005af4c7f99827e8703..d17ad2f2cf127adecf7869986972e3349b83493f 100644 (file)
@@ -45,7 +45,7 @@ class Buffer {
       : buffer_(buffer), range_(data) {}
 
   Buffer(Buffer&&) = default;
-  Buffer& operator=(Buffer&&) = default;
+  Buffer& operator=(Buffer&&) = default;
 
   /**
    * Splits the data into two pieces: [begin, begin + n), [begin + n, end).
index fedb5d786c6865751b2cecee0b4dd0ff1aa3ff10..6a850ad4eaa5bd20718cc9c37d1ac42ac9eb4fa1 100644 (file)
@@ -6,7 +6,7 @@
  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
  * in the COPYING file in the root directory of this source tree).
  */
+
 /**
  * A subset of `folly/Range.h`.
  * All code copied verbatim modulo formatting
@@ -83,8 +83,8 @@ class Range {
   Range(const Range&) = default;
   Range(Range&&) = default;
 
-  Range& operator=(const Range&) = default;
-  Range& operator=(Range&&) = default;
+  Range& operator=(const Range&) = default;
+  Range& operator=(Range&&) = default;
 
   constexpr size_type size() const {
     return e_ - b_;