From: Francis Deslauriers Date: Tue, 8 Mar 2022 21:41:24 +0000 (-0500) Subject: field-class.hpp: remove redundant template parameters X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=0d6ad4d8291c4ace3564658f1204570dab55ccd1 field-class.hpp: remove redundant template parameters C++ Standard excerpt: 14.6.1 Locally declared names [temp.local] Like normal (non-template) classes, class templates have an injected-class-name (Clause 9). The injected-class-name can be used with or without a template-argument-list. When it is used without a template-argument-list, it is equivalent to the injected-class-name followed by the template-parameters of the class template enclosed in <>. When it is used with a template-argument-list, it refers to the specified class template specialization, which could be the current specialization or another specialization. Signed-off-by: Francis Deslauriers Change-Id: I1c0c104431f7cf57806a66ed1bce964c007f2c47 Reviewed-on: https://review.lttng.org/c/babeltrace/+/7527 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/10762 Tested-by: jenkins CI-Build: Philippe Proulx --- diff --git a/src/cpp-common/bt2/field-class.hpp b/src/cpp-common/bt2/field-class.hpp index d308c070..dc25d4cf 100644 --- a/src/cpp-common/bt2/field-class.hpp +++ b/src/cpp-common/bt2/field-class.hpp @@ -207,7 +207,7 @@ public: } template - _ThisCommonFieldClass& operator=(const CommonFieldClass& fc) noexcept + CommonFieldClass& operator=(const CommonFieldClass& fc) noexcept { _ThisBorrowedObj::operator=(fc); return *this; @@ -525,8 +525,7 @@ public: } template - _ThisCommonIntegerFieldClass& - operator=(const CommonIntegerFieldClass& fc) noexcept + CommonIntegerFieldClass& operator=(const CommonIntegerFieldClass& fc) noexcept { _ThisCommonFieldClass::operator=(fc); return *this; @@ -617,7 +616,6 @@ class ConstEnumerationFieldClassMapping final : public internal::BorrowedObj::_ThisBorrowedObj; using typename internal::BorrowedObj::_LibObjPtr; - using _ThisConstEnumerationFieldClassMapping = ConstEnumerationFieldClassMapping; public: using RangeSet = typename std::conditional< @@ -629,14 +627,13 @@ public: { } - ConstEnumerationFieldClassMapping( - const _ThisConstEnumerationFieldClassMapping& mapping) noexcept : + ConstEnumerationFieldClassMapping(const ConstEnumerationFieldClassMapping& mapping) noexcept : _ThisBorrowedObj {mapping} { } - _ThisConstEnumerationFieldClassMapping& - operator=(const _ThisConstEnumerationFieldClassMapping& mapping) noexcept + ConstEnumerationFieldClassMapping& + operator=(const ConstEnumerationFieldClassMapping& mapping) noexcept { _ThisBorrowedObj::operator=(mapping); return *this; @@ -728,7 +725,7 @@ public: } template - _ThisCommonBaseEnumerationFieldClass& + CommonBaseEnumerationFieldClass& operator=(const CommonBaseEnumerationFieldClass& fc) noexcept { _ThisCommonIntegerFieldClass::operator=(fc); @@ -772,7 +769,7 @@ public: } template - _ThisCommonEnumerationFieldClass& + CommonEnumerationFieldClass& operator=(const CommonEnumerationFieldClass& fc) noexcept { _ThisCommonEnumerationFieldClass::operator=(fc); @@ -974,8 +971,7 @@ public: } template - CommonStructureFieldClass& - operator=(const CommonStructureFieldClass& fc) noexcept + CommonStructureFieldClass& operator=(const CommonStructureFieldClass& fc) noexcept { _ThisCommonFieldClass::operator=(fc); return *this; @@ -1128,7 +1124,7 @@ public: } template - _ThisCommonArrayFieldClass& operator=(const CommonArrayFieldClass& fc) noexcept + CommonArrayFieldClass& operator=(const CommonArrayFieldClass& fc) noexcept { _ThisCommonFieldClass::operator=(fc); return *this; @@ -1179,7 +1175,7 @@ public: } template - CommonStaticArrayFieldClass& + CommonStaticArrayFieldClass& operator=(const CommonStaticArrayFieldClass& fc) noexcept { _ThisCommonArrayFieldClass::operator=(fc); @@ -1225,7 +1221,7 @@ public: } template - CommonDynamicArrayWithLengthFieldClass& + CommonDynamicArrayWithLengthFieldClass& operator=(const CommonDynamicArrayWithLengthFieldClass& fc) noexcept { _ThisCommonArrayFieldClass::operator=(fc); @@ -1306,7 +1302,7 @@ public: } template - _ThisCommonOptionFieldClass& operator=(const CommonOptionFieldClass& fc) noexcept + CommonOptionFieldClass& operator=(const CommonOptionFieldClass& fc) noexcept { _ThisCommonFieldClass::operator=(fc); return *this; @@ -1361,7 +1357,7 @@ public: } template - _ThisCommonOptionWithSelectorFieldClass& + CommonOptionWithSelectorFieldClass& operator=(const CommonOptionWithSelectorFieldClass& fc) noexcept { _ThisCommonOptionFieldClass::operator=(fc); @@ -1411,7 +1407,7 @@ public: } template - CommonOptionWithBoolSelectorFieldClass& + CommonOptionWithBoolSelectorFieldClass& operator=(const CommonOptionWithBoolSelectorFieldClass& fc) noexcept { _ThisCommonOptionWithSelectorFieldClass::operator=(fc); @@ -1498,7 +1494,7 @@ public: } template - _ThisCommonOptionWithIntegerSelectorFieldClass& + CommonOptionWithIntegerSelectorFieldClass& operator=(const CommonOptionWithIntegerSelectorFieldClass& fc) noexcept { _ThisCommonOptionWithSelectorFieldClass::operator=(fc); @@ -1580,7 +1576,7 @@ public: } template - CommonVariantFieldClassOption& + CommonVariantFieldClassOption& operator=(const CommonVariantFieldClassOption& fc) noexcept { _ThisBorrowedObj::operator=(fc); @@ -1691,7 +1687,7 @@ public: } template - ConstVariantWithIntegerSelectorFieldClassOption& + ConstVariantWithIntegerSelectorFieldClassOption& operator=(const ConstVariantWithIntegerSelectorFieldClassOption& fc) noexcept { _ThisBorrowedObj::operator=(fc); @@ -1800,8 +1796,7 @@ public: } template - _ThisCommonVariantFieldClass& - operator=(const CommonVariantFieldClass& fc) noexcept + CommonVariantFieldClass& operator=(const CommonVariantFieldClass& fc) noexcept { _ThisCommonFieldClass::operator=(fc); return *this; @@ -1906,7 +1901,7 @@ public: } template - CommonVariantWithoutSelectorFieldClass& + CommonVariantWithoutSelectorFieldClass& operator=(const CommonVariantWithoutSelectorFieldClass& fc) noexcept { _ThisCommonVariantFieldClass::operator=(fc); @@ -2035,7 +2030,7 @@ public: } template - _ThisCommonVariantWithSelectorFieldClass& + CommonVariantWithSelectorFieldClass& operator=(const CommonVariantWithSelectorFieldClass& fc) noexcept { _ThisCommonVariantFieldClass::operator=(fc); @@ -2088,7 +2083,7 @@ public: } template - _ThisCommonVariantWithIntegerSelectorFieldClass& + CommonVariantWithIntegerSelectorFieldClass& operator=(const CommonVariantWithIntegerSelectorFieldClass& fc) noexcept { _ThisCommonVariantWithSelectorFieldClass::operator=(fc);