gdb, gdbsupport: use DISABLE_COPY_AND_ASSIGN in a few spots

Replace some explicitly deleted copy constructor and copy assignment
operator with the DISABLE_COPY_AND_ASSIGN macro for consistency
with the rest of the codebase.

Change-Id: If3fe2c4d7b3cb4530eace86d589116f805c7656f
Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
Simon Marchi
2025-11-13 16:00:48 -05:00
committed by Simon Marchi
parent 3917afa371
commit 4ec16ac822
10 changed files with 24 additions and 40 deletions

View File

@@ -52,8 +52,7 @@ public:
{
}
gdb_argv (const gdb_argv &) = delete;
gdb_argv &operator= (const gdb_argv &) = delete;
DISABLE_COPY_AND_ASSIGN (gdb_argv);
gdb_argv &operator= (gdb_argv &&other)
{

View File

@@ -178,10 +178,11 @@ public:
}
future () = default;
DISABLE_COPY_AND_ASSIGN (future);
future (future &&other) = default;
future (const future &other) = delete;
future &operator= (future &&other) = default;
future &operator= (const future &other) = delete;
void wait () const { }

View File

@@ -48,15 +48,15 @@ public:
/* Nothing. */
}
/* Don't currently support copying the strings from OTHER. */
DISABLE_COPY_AND_ASSIGN (argv_vec);
/* Move the owned strings from OTHER. */
argv_vec (argv_vec &&other)
{
this->m_args = std::move (other.m_args);
}
/* Don't currently support copying the strings from OTHER. */
argv_vec (const argv_vec &other) = delete;
/* Move elements from OTHER. Free currently owned strings. */
argv_vec &operator= (argv_vec &&other)
{
@@ -65,9 +65,6 @@ public:
return *this;
}
/* Don't currently support copying the strings from OTHER. */
argv_vec &operator= (const argv_vec &other) = delete;
/* Release the owned strings. */
~argv_vec ()
{