Probably null change: make sure that all classes with destructors also have copy constructors and assignment operators

This commit is contained in:
Jean-Francois Dockes
2021-11-23 16:38:11 +01:00
parent f813c1356e
commit 756a944ef3
75 changed files with 282 additions and 165 deletions
+8 -8
View File
@@ -103,6 +103,14 @@ public:
freeAll();
}
RclConfig& operator=(const RclConfig &r) {
if (this != &r) {
freeAll();
initFrom(r);
}
return *this;
}
// Return a writable clone of the main config. This belongs to the
// caller (must delete it when done)
ConfNull *cloneMainConfig();
@@ -362,14 +370,6 @@ public:
return o_origcwd;
}
RclConfig& operator=(const RclConfig &r) {
if (this != &r) {
freeAll();
initFrom(r);
}
return *this;
}
friend class ParamStale;
private:
+2
View File
@@ -50,6 +50,8 @@ public:
TextSplit(Flags flags = Flags(TXTS_NONE))
: m_flags(flags) {}
virtual ~TextSplit() {}
TextSplit(const TextSplit&) = delete;
TextSplit& operator=(const TextSplit&) = delete;
/** Call at program initialization to read non default values from the
configuration */
+2
View File
@@ -34,6 +34,8 @@ class WebStore {
public:
WebStore(RclConfig *config);
~WebStore();
WebStore(const WebStore&) = delete;
WebStore& operator=(const WebStore&) = delete;
bool getFromCache(const std::string& udi, Rcl::Doc &doc, std::string& data,
std::string *hittype = 0);