From aad1392d811bf27550fb3162224d41a2257ae8f5 Mon Sep 17 00:00:00 2001 From: Mike FABIAN Date: Sun, 22 Sep 2024 10:36:36 +0200 Subject: [PATCH] ICU-22910 Fix coverity warning in number_fluent.cpp See: https://unicode-org.atlassian.net/browse/ICU-22910 --- icu4c/source/i18n/number_fluent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icu4c/source/i18n/number_fluent.cpp b/icu4c/source/i18n/number_fluent.cpp index 0ce01c854cae..b6150ddc7830 100644 --- a/icu4c/source/i18n/number_fluent.cpp +++ b/icu4c/source/i18n/number_fluent.cpp @@ -472,9 +472,9 @@ LocalizedNumberFormatter::LocalizedNumberFormatter(const NFS& other) LocalizedNumberFormatter::LocalizedNumberFormatter(LocalizedNumberFormatter&& src) noexcept : LNF(static_cast&&>(src)) {} -LocalizedNumberFormatter::LocalizedNumberFormatter(NFS&& src) noexcept - : NFS(std::move(src)) { - lnfMoveHelper(std::move(static_cast(src))); +LocalizedNumberFormatter::LocalizedNumberFormatter(NFS&& src) noexcept { + lnfMoveHelper(static_cast(src)); // Call before moving src + static_cast&>(*this) = std::move(src); // Move after } LocalizedNumberFormatter& LocalizedNumberFormatter::operator=(const LNF& other) {