Skip to content

Commit

Permalink
ICU-22910 Fix coverity warning in number_fluent.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-fabian committed Sep 22, 2024
1 parent 2f348f4 commit aad1392
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions icu4c/source/i18n/number_fluent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ LocalizedNumberFormatter::LocalizedNumberFormatter(const NFS<LNF>& other)
LocalizedNumberFormatter::LocalizedNumberFormatter(LocalizedNumberFormatter&& src) noexcept
: LNF(static_cast<NFS<LNF>&&>(src)) {}

LocalizedNumberFormatter::LocalizedNumberFormatter(NFS<LNF>&& src) noexcept
: NFS<LNF>(std::move(src)) {
lnfMoveHelper(std::move(static_cast<LNF&&>(src)));
LocalizedNumberFormatter::LocalizedNumberFormatter(NFS<LNF>&& src) noexcept {
lnfMoveHelper(static_cast<LNF&&>(src)); // Call before moving src
static_cast<NFS<LNF>&>(*this) = std::move(src); // Move after
}

LocalizedNumberFormatter& LocalizedNumberFormatter::operator=(const LNF& other) {
Expand Down

0 comments on commit aad1392

Please sign in to comment.