From ed910d6090e48417a90084d7161023f429fa4e1e Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Sat, 18 Feb 2023 14:15:56 +0300 Subject: [PATCH] Fix -Wdeprecated-copy from c++11 --- src/fstext/lattice-weight.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fstext/lattice-weight.h b/src/fstext/lattice-weight.h index 7637c4d1c55..6e7737a195d 100644 --- a/src/fstext/lattice-weight.h +++ b/src/fstext/lattice-weight.h @@ -438,11 +438,9 @@ class CompactLatticeWeightTpl { CompactLatticeWeightTpl(const WeightType &w, const std::vector &s): weight_(w), string_(s) { } - CompactLatticeWeightTpl &operator=(const CompactLatticeWeightTpl &w) { - weight_ = w.weight_; - string_ = w.string_; - return *this; - } + CompactLatticeWeightTpl(const CompactLatticeWeightTpl &compactLatticeWeightTpl) = default; + + CompactLatticeWeightTpl &operator=(const CompactLatticeWeightTpl &w) = default; const W &Weight() const { return weight_; }