X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=inline;f=src%2Fcpp-common%2Fbt2%2Fvalue.hpp;h=6e05cd0d36c80625f8a35a30c7f187bb850f697b;hb=100fa861dbb7e463175e63326e8871446f0f35f0;hp=41bb4db52bfd899a54c2b49ab1f840c94fe740d2;hpb=39278ebc70d57de534466c533d6c543a318dfdac;p=babeltrace.git diff --git a/src/cpp-common/bt2/value.hpp b/src/cpp-common/bt2/value.hpp index 41bb4db5..6e05cd0d 100644 --- a/src/cpp-common/bt2/value.hpp +++ b/src/cpp-common/bt2/value.hpp @@ -134,12 +134,12 @@ public: } template - CommonValue(const CommonValue& val) noexcept : _ThisBorrowedObj {val} + CommonValue(const CommonValue val) noexcept : _ThisBorrowedObj {val} { } template - _ThisCommonValue& operator=(const CommonValue& val) noexcept + _ThisCommonValue& operator=(const CommonValue val) noexcept { _ThisBorrowedObj::operator=(val); return *this; @@ -196,13 +196,13 @@ public: } template - bool operator==(const CommonValue& other) const noexcept + bool operator==(const CommonValue other) const noexcept { return static_cast(bt_value_is_equal(this->libObjPtr(), other.libObjPtr())); } template - bool operator!=(const CommonValue& other) const noexcept + bool operator!=(const CommonValue other) const noexcept { return !(*this == other); } @@ -271,12 +271,12 @@ public: } template - CommonNullValue(const CommonNullValue& val) noexcept : _ThisCommonValue {val} + CommonNullValue(const CommonNullValue val) noexcept : _ThisCommonValue {val} { } template - CommonNullValue& operator=(const CommonNullValue& val) noexcept + CommonNullValue& operator=(const CommonNullValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -328,7 +328,7 @@ public: } template - CommonBoolValue(const CommonBoolValue& val) noexcept : _ThisCommonValue {val} + CommonBoolValue(const CommonBoolValue val) noexcept : _ThisCommonValue {val} { } @@ -341,7 +341,7 @@ public: } template - CommonBoolValue& operator=(const CommonBoolValue& val) noexcept + CommonBoolValue& operator=(const CommonBoolValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -420,14 +420,14 @@ public: } template - CommonUnsignedIntegerValue(const CommonUnsignedIntegerValue& val) noexcept : + CommonUnsignedIntegerValue(const CommonUnsignedIntegerValue val) noexcept : _ThisCommonValue {val} { } template CommonUnsignedIntegerValue& - operator=(const CommonUnsignedIntegerValue& val) noexcept + operator=(const CommonUnsignedIntegerValue val) noexcept { static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); @@ -506,14 +506,14 @@ public: } template - CommonSignedIntegerValue(const CommonSignedIntegerValue& val) noexcept : + CommonSignedIntegerValue(const CommonSignedIntegerValue val) noexcept : _ThisCommonValue {val} { } template CommonSignedIntegerValue& - operator=(const CommonSignedIntegerValue& val) noexcept + operator=(const CommonSignedIntegerValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -591,12 +591,12 @@ public: } template - CommonRealValue(const CommonRealValue& val) noexcept : _ThisCommonValue {val} + CommonRealValue(const CommonRealValue val) noexcept : _ThisCommonValue {val} { } template - CommonRealValue& operator=(const CommonRealValue& val) noexcept + CommonRealValue& operator=(const CommonRealValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -678,12 +678,12 @@ public: } template - CommonStringValue(const CommonStringValue& val) noexcept : _ThisCommonValue {val} + CommonStringValue(const CommonStringValue val) noexcept : _ThisCommonValue {val} { } template - CommonStringValue& operator=(const CommonStringValue& val) noexcept + CommonStringValue& operator=(const CommonStringValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -790,12 +790,12 @@ public: } template - CommonArrayValue(const CommonArrayValue& val) noexcept : _ThisCommonValue {val} + CommonArrayValue(const CommonArrayValue val) noexcept : _ThisCommonValue {val} { } template - CommonArrayValue& operator=(const CommonArrayValue& val) noexcept + CommonArrayValue& operator=(const CommonArrayValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -839,7 +839,7 @@ public: internal::CommonArrayValueSpec::elementByIndex(this->libObjPtr(), index)}; } - void append(const Value& val) + void append(const Value val) { static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); @@ -903,7 +903,7 @@ public: CommonArrayValue appendEmptyArray(); CommonMapValue appendEmptyMap(); - void operator+=(const Value& val) + void operator+=(const Value val) { this->append(val); } @@ -1100,12 +1100,12 @@ public: } template - CommonMapValue(const CommonMapValue& val) noexcept : _ThisCommonValue {val} + CommonMapValue(const CommonMapValue val) noexcept : _ThisCommonValue {val} { } template - CommonMapValue& operator=(const CommonMapValue& val) noexcept + CommonMapValue& operator=(const CommonMapValue val) noexcept { _ThisCommonValue::operator=(val); return *this; @@ -1165,7 +1165,7 @@ public: return this->hasEntry(key.data()); } - void insert(const char * const key, const Value& val) + void insert(const char * const key, const Value val) { static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); @@ -1174,7 +1174,7 @@ public: this->_handleInsertLibStatus(status); } - void insert(const std::string& key, const Value& val) + void insert(const std::string& key, const Value val) { this->insert(key.data(), val); }