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);
|
explicit BloomFilterVal(probabilistic::BloomFilter* bf);
|
||||||
~BloomFilterVal() override;
|
~BloomFilterVal() override;
|
||||||
|
|
||||||
|
// Disable.
|
||||||
|
BloomFilterVal(const BloomFilterVal&) = delete;
|
||||||
|
BloomFilterVal& operator=(const BloomFilterVal&) = delete;
|
||||||
|
|
||||||
ValPtr DoClone(CloneState* state) override;
|
ValPtr DoClone(CloneState* state) override;
|
||||||
|
|
||||||
const TypePtr& Type() const { return type; }
|
const TypePtr& Type() const { return type; }
|
||||||
|
@ -350,10 +354,6 @@ protected:
|
||||||
|
|
||||||
DECLARE_OPAQUE_VALUE_DATA(BloomFilterVal)
|
DECLARE_OPAQUE_VALUE_DATA(BloomFilterVal)
|
||||||
private:
|
private:
|
||||||
// Disable.
|
|
||||||
BloomFilterVal(const BloomFilterVal&);
|
|
||||||
BloomFilterVal& operator=(const BloomFilterVal&);
|
|
||||||
|
|
||||||
TypePtr type;
|
TypePtr type;
|
||||||
detail::CompositeHash* hash;
|
detail::CompositeHash* hash;
|
||||||
probabilistic::BloomFilter* bloom_filter;
|
probabilistic::BloomFilter* bloom_filter;
|
||||||
|
|
|
@ -40,6 +40,8 @@ public:
|
||||||
|
|
||||||
using BSSAlignVec = std::vector<BSSAlign>;
|
using BSSAlignVec = std::vector<BSSAlign>;
|
||||||
|
|
||||||
|
Substring() = delete;
|
||||||
|
|
||||||
explicit Substring(const std::string& string) : String(string), _num(), _new(false) {}
|
explicit Substring(const std::string& string) : String(string), _num(), _new(false) {}
|
||||||
|
|
||||||
explicit Substring(const String& string) : String(string), _num(), _new(false) {}
|
explicit Substring(const String& string) : String(string), _num(), _new(false) {}
|
||||||
|
@ -75,8 +77,6 @@ public:
|
||||||
private:
|
private:
|
||||||
using DataMap = std::map<std::string, void*>;
|
using DataMap = std::map<std::string, void*>;
|
||||||
|
|
||||||
Substring();
|
|
||||||
|
|
||||||
// The alignments registered for this substring.
|
// The alignments registered for this substring.
|
||||||
BSSAlignVec _aligns;
|
BSSAlignVec _aligns;
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
const ReaderInfo& operator=(const ReaderInfo& other) = delete;
|
||||||
const ReaderInfo& operator=(const ReaderInfo& other); // Disable.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -127,8 +127,7 @@ public:
|
||||||
broker::data ToBroker() const;
|
broker::data ToBroker() const;
|
||||||
bool FromBroker(broker::data d);
|
bool FromBroker(broker::data d);
|
||||||
|
|
||||||
private:
|
const WriterInfo& operator=(const WriterInfo& other) = delete;
|
||||||
const WriterInfo& operator=(const WriterInfo& other); // Disable.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -47,6 +47,8 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~CounterVector();
|
virtual ~CounterVector();
|
||||||
|
|
||||||
|
CounterVector& operator=(const CounterVector&) = delete;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Increments a given cell.
|
* Increments a given cell.
|
||||||
*
|
*
|
||||||
|
@ -157,8 +159,6 @@ protected:
|
||||||
CounterVector() = default;
|
CounterVector() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CounterVector& operator=(const CounterVector&); // Disable.
|
|
||||||
|
|
||||||
BitVector* bits = nullptr;
|
BitVector* bits = nullptr;
|
||||||
size_t width = 0;
|
size_t width = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -185,6 +185,9 @@ struct Cookie {
|
||||||
throw std::runtime_error("invalid cookie");
|
throw std::runtime_error("invalid cookie");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Cookie(const Cookie& other) = delete;
|
||||||
|
Cookie& operator=(const Cookie& other) = delete;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
union Data {
|
union Data {
|
||||||
cookie::ProtocolAnalyzer protocol;
|
cookie::ProtocolAnalyzer protocol;
|
||||||
|
@ -242,9 +245,6 @@ private:
|
||||||
packet = &data.packet;
|
packet = &data.packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
Cookie(const Cookie& other) = delete;
|
|
||||||
Cookie& operator=(const Cookie& other) = delete;
|
|
||||||
|
|
||||||
friend inline void swap(Cookie& lhs, Cookie& rhs) noexcept {
|
friend inline void swap(Cookie& lhs, Cookie& rhs) noexcept {
|
||||||
Cookie tmp = std::move(lhs);
|
Cookie tmp = std::move(lhs);
|
||||||
lhs = std::move(rhs);
|
lhs = std::move(rhs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue