mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Move constructors/operators should be marked noexcept to avoid the compiler picking the copy constructor instead (performance-noexcept-move-constructor)
This commit is contained in:
parent
38333aac91
commit
95d2af4501
6 changed files with 6 additions and 6 deletions
|
@ -65,7 +65,7 @@ Tag& Tag::operator=(const Tag& other)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tag& Tag::operator=(const Tag&& other)
|
Tag& Tag::operator=(const Tag&& other) noexcept
|
||||||
{
|
{
|
||||||
if ( this != &other )
|
if ( this != &other )
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,7 @@ protected:
|
||||||
/**
|
/**
|
||||||
* Move assignment operator.
|
* Move assignment operator.
|
||||||
*/
|
*/
|
||||||
Tag& operator=(const Tag&& other);
|
Tag& operator=(const Tag&& other) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares two tags for equality.
|
* Compares two tags for equality.
|
||||||
|
|
|
@ -16,7 +16,7 @@ logging::Tag& logging::Tag::operator=(const logging::Tag& other)
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
logging::Tag& logging::Tag::operator=(const logging::Tag&& other)
|
logging::Tag& logging::Tag::operator=(const logging::Tag&& other) noexcept
|
||||||
{
|
{
|
||||||
::Tag::operator=(other);
|
::Tag::operator=(other);
|
||||||
return *this;
|
return *this;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Move assignment operator.
|
* Move assignment operator.
|
||||||
*/
|
*/
|
||||||
Tag& operator=(const Tag&& other);
|
Tag& operator=(const Tag&& other) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares two tags for equality.
|
* Compares two tags for equality.
|
||||||
|
|
|
@ -76,7 +76,7 @@ CardinalityCounter::CardinalityCounter(CardinalityCounter& other)
|
||||||
p = other.p;
|
p = other.p;
|
||||||
}
|
}
|
||||||
|
|
||||||
CardinalityCounter::CardinalityCounter(CardinalityCounter&& o)
|
CardinalityCounter::CardinalityCounter(CardinalityCounter&& o) noexcept
|
||||||
{
|
{
|
||||||
V = o.V;
|
V = o.V;
|
||||||
alpha_m = o.alpha_m;
|
alpha_m = o.alpha_m;
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Move-Constructor
|
* Move-Constructor
|
||||||
*/
|
*/
|
||||||
CardinalityCounter(CardinalityCounter&& o);
|
CardinalityCounter(CardinalityCounter&& o) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for a known number of buckets.
|
* Constructor for a known number of buckets.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue