Explicitly default copy ctors for some classes

This fixes -Wdeprecated-copy with FreeBSD's clang17.

This commit reverts a change from 8a32b0b3d4, where a private copy
assignment operator was deleted, whereas it was needed to explicitly
declare the copy constructor, refs #5294.
This commit is contained in:
Itms
2024-08-28 21:44:06 +02:00
committed by Nicolas Auvray
parent ac3e8f34c3
commit 3dfc7c57e0
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -34,6 +34,8 @@ public:
// LOGWARNING("New interned string '%s'", data.c_str());
}
CStrInternInternals(const CStrInternInternals& b) = default;
bool operator==(const CStrInternInternals& b) const
{
// Compare hash first for quick rejection of inequal strings
@@ -91,8 +91,9 @@ const bool NOMERGE = false;
#define COMMANDDATASTRUCT(t) \
struct d##t { \
private: \
d##t& operator=(const d##t&) = delete; \
public:
const d##t& operator=(const d##t&); \
public: \
d##t(const d##t& d) = default;
#define COMMANDSTRUCT(t, merge) \
struct m##t : public mWorldCommand, public d##t { \