mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy modernize-use-equals-delete warnings in headers
This commit is contained in:
parent
cb78d2202f
commit
f15cab4a2b
6 changed files with 13 additions and 15 deletions
|
@ -328,6 +328,10 @@ public:
|
|||
explicit BloomFilterVal(probabilistic::BloomFilter* bf);
|
||||
~BloomFilterVal() override;
|
||||
|
||||
// Disable.
|
||||
BloomFilterVal(const BloomFilterVal&) = delete;
|
||||
BloomFilterVal& operator=(const BloomFilterVal&) = delete;
|
||||
|
||||
ValPtr DoClone(CloneState* state) override;
|
||||
|
||||
const TypePtr& Type() const { return type; }
|
||||
|
@ -350,10 +354,6 @@ protected:
|
|||
|
||||
DECLARE_OPAQUE_VALUE_DATA(BloomFilterVal)
|
||||
private:
|
||||
// Disable.
|
||||
BloomFilterVal(const BloomFilterVal&);
|
||||
BloomFilterVal& operator=(const BloomFilterVal&);
|
||||
|
||||
TypePtr type;
|
||||
detail::CompositeHash* hash;
|
||||
probabilistic::BloomFilter* bloom_filter;
|
||||
|
|
|
@ -40,6 +40,8 @@ public:
|
|||
|
||||
using BSSAlignVec = std::vector<BSSAlign>;
|
||||
|
||||
Substring() = delete;
|
||||
|
||||
explicit Substring(const std::string& string) : String(string), _num(), _new(false) {}
|
||||
|
||||
explicit Substring(const String& string) : String(string), _num(), _new(false) {}
|
||||
|
@ -75,8 +77,6 @@ public:
|
|||
private:
|
||||
using DataMap = std::map<std::string, void*>;
|
||||
|
||||
Substring();
|
||||
|
||||
// The alignments registered for this substring.
|
||||
BSSAlignVec _aligns;
|
||||
|
||||
|
|
|
@ -132,8 +132,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
private:
|
||||
const ReaderInfo& operator=(const ReaderInfo& other); // Disable.
|
||||
const ReaderInfo& operator=(const ReaderInfo& other) = delete;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,8 +127,7 @@ public:
|
|||
broker::data ToBroker() const;
|
||||
bool FromBroker(broker::data d);
|
||||
|
||||
private:
|
||||
const WriterInfo& operator=(const WriterInfo& other); // Disable.
|
||||
const WriterInfo& operator=(const WriterInfo& other) = delete;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,6 +47,8 @@ public:
|
|||
*/
|
||||
virtual ~CounterVector();
|
||||
|
||||
CounterVector& operator=(const CounterVector&) = delete;
|
||||
|
||||
/**
|
||||
* Increments a given cell.
|
||||
*
|
||||
|
@ -157,8 +159,6 @@ protected:
|
|||
CounterVector() = default;
|
||||
|
||||
private:
|
||||
CounterVector& operator=(const CounterVector&); // Disable.
|
||||
|
||||
BitVector* bits = nullptr;
|
||||
size_t width = 0;
|
||||
};
|
||||
|
|
|
@ -185,6 +185,9 @@ struct Cookie {
|
|||
throw std::runtime_error("invalid cookie");
|
||||
}
|
||||
|
||||
Cookie(const Cookie& other) = delete;
|
||||
Cookie& operator=(const Cookie& other) = delete;
|
||||
|
||||
private:
|
||||
union Data {
|
||||
cookie::ProtocolAnalyzer protocol;
|
||||
|
@ -242,9 +245,6 @@ private:
|
|||
packet = &data.packet;
|
||||
}
|
||||
|
||||
Cookie(const Cookie& other) = delete;
|
||||
Cookie& operator=(const Cookie& other) = delete;
|
||||
|
||||
friend inline void swap(Cookie& lhs, Cookie& rhs) noexcept {
|
||||
Cookie tmp = std::move(lhs);
|
||||
lhs = std::move(rhs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue