clang-tidy: use delete

The clang warning for pending_signals_t was about the operator=
return type being wrong (misc-unconventional-assign-operator).

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-08-17 16:49:00 -07:00 committed by Johannes Altmanninger
parent 5de05a810c
commit 90f006b1cd
3 changed files with 9 additions and 11 deletions

View file

@ -179,14 +179,12 @@ class universal_notifier_t {
strategy_named_pipe, strategy_named_pipe,
}; };
universal_notifier_t(const universal_notifier_t &) = delete;
universal_notifier_t &operator=(const universal_notifier_t &) = delete;
protected: protected:
universal_notifier_t(); universal_notifier_t();
private:
// No copying.
universal_notifier_t &operator=(const universal_notifier_t &);
universal_notifier_t(const universal_notifier_t &x);
public: public:
static notifier_strategy_t resolve_default_strategy(); static notifier_strategy_t resolve_default_strategy();
virtual ~universal_notifier_t(); virtual ~universal_notifier_t();

View file

@ -42,8 +42,8 @@ class pending_signals_t {
pending_signals_t() = default; pending_signals_t() = default;
/// No copying. /// No copying.
pending_signals_t(const pending_signals_t &); pending_signals_t(const pending_signals_t &) = delete;
void operator=(const pending_signals_t &); pending_signals_t& operator=(const pending_signals_t &) = delete;
/// Mark a signal as pending. This may be called from a signal handler. /// Mark a signal as pending. This may be called from a signal handler.
/// We expect only one signal handler to execute at once. /// We expect only one signal handler to execute at once.

View file

@ -269,10 +269,6 @@ class parser_t : public std::enable_shared_from_this<parser_t> {
/// to profile_items). deque does not move items on reallocation. /// to profile_items). deque does not move items on reallocation.
std::deque<profile_item_t> profile_items; std::deque<profile_item_t> profile_items;
// No copying allowed.
parser_t(const parser_t &);
parser_t &operator=(const parser_t &);
/// Adds a job to the beginning of the job list. /// Adds a job to the beginning of the job list.
void job_add(shared_ptr<job_t> job); void job_add(shared_ptr<job_t> job);
@ -290,6 +286,10 @@ class parser_t : public std::enable_shared_from_this<parser_t> {
static std::shared_ptr<parser_t> principal; static std::shared_ptr<parser_t> principal;
public: public:
// No copying allowed.
parser_t(const parser_t &) = delete;
parser_t &operator=(const parser_t &) = delete;
/// Get the "principal" parser, whatever that is. /// Get the "principal" parser, whatever that is.
static parser_t &principal_parser(); static parser_t &principal_parser();