From 48e7169bd825342d1e7d91228d80798af74b9b2d Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Fri, 13 Sep 2019 14:13:41 -0700 Subject: [PATCH] Add move assignment operator to logging::Tag (Coverity 1357732) --- src/logging/Tag.cc | 6 ++++++ src/logging/Tag.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/logging/Tag.cc b/src/logging/Tag.cc index f6e7f89c4c..d5f3f553d1 100644 --- a/src/logging/Tag.cc +++ b/src/logging/Tag.cc @@ -16,6 +16,12 @@ logging::Tag& logging::Tag::operator=(const logging::Tag& other) return *this; } +logging::Tag& logging::Tag::operator=(const logging::Tag&& other) + { + ::Tag::operator=(other); + return *this; + } + EnumVal* logging::Tag::AsEnumVal() const { return ::Tag::AsEnumVal(log_mgr->GetTagEnumType()); diff --git a/src/logging/Tag.h b/src/logging/Tag.h index 8357aee663..e75d7fc007 100644 --- a/src/logging/Tag.h +++ b/src/logging/Tag.h @@ -50,6 +50,11 @@ public: */ Tag& operator=(const Tag& other); + /** + * Move assignment operator. + */ + Tag& operator=(const Tag&& other); + /** * Compares two tags for equality. */