mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
Add missing special member functions
This commit is contained in:
parent
2af7c56254
commit
db76b3b856
@ -142,10 +142,14 @@ class RenameOp {
|
|||||||
last = renameList->begin();
|
last = renameList->begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
RenameOp(const RenameOp &src) = default;
|
// destructor
|
||||||
|
|
||||||
~RenameOp();
|
~RenameOp();
|
||||||
|
|
||||||
|
RenameOp(const RenameOp &src) = delete; // copy contructor
|
||||||
|
RenameOp(RenameOp&& other) = delete; // move constructor
|
||||||
|
RenameOp& operator=(const RenameOp& other) = delete; // copy assignment
|
||||||
|
RenameOp& operator=(RenameOp&& other) = delete; // move assignment
|
||||||
|
|
||||||
explicit operator bool() const { return renameList != nullptr; }
|
explicit operator bool() const { return renameList != nullptr; }
|
||||||
|
|
||||||
bool apply();
|
bool apply();
|
||||||
|
@ -50,16 +50,32 @@ static bool NullCipher_registered = Cipher::Register(
|
|||||||
class NullKey : public AbstractCipherKey {
|
class NullKey : public AbstractCipherKey {
|
||||||
public:
|
public:
|
||||||
NullKey() = default;
|
NullKey() = default;
|
||||||
|
|
||||||
|
// destructor
|
||||||
~NullKey() override = default;
|
~NullKey() override = default;
|
||||||
|
|
||||||
|
NullKey(const NullKey &src) = delete; // copy constructor
|
||||||
|
NullKey(NullKey&& other) = delete; // move constructor
|
||||||
|
NullKey& operator=(const NullKey& other) = delete; // copy assignment
|
||||||
|
NullKey& operator=(NullKey&& other) = delete; // move assignment
|
||||||
};
|
};
|
||||||
|
|
||||||
class NullDestructor {
|
class NullDestructor {
|
||||||
public:
|
public:
|
||||||
NullDestructor() = default;
|
NullDestructor() = default;
|
||||||
NullDestructor(const NullDestructor &) = default;
|
|
||||||
|
// destructor
|
||||||
~NullDestructor() = default;
|
~NullDestructor() = default;
|
||||||
|
|
||||||
NullDestructor &operator=(const NullDestructor &) = default;
|
// copy contructor
|
||||||
|
NullDestructor(const NullDestructor &) = default;
|
||||||
|
|
||||||
|
// move constructor
|
||||||
|
NullDestructor(NullDestructor &&) = default;
|
||||||
|
|
||||||
|
NullDestructor &operator=(const NullDestructor &) = delete; // copy assignment
|
||||||
|
NullDestructor& operator=(NullDestructor&& other) = delete; // move assignment
|
||||||
|
|
||||||
void operator()(NullKey *&) {}
|
void operator()(NullKey *&) {}
|
||||||
};
|
};
|
||||||
std::shared_ptr<AbstractCipherKey> gNullKey(new NullKey(), NullDestructor());
|
std::shared_ptr<AbstractCipherKey> gNullKey(new NullKey(), NullDestructor());
|
||||||
|
@ -293,7 +293,14 @@ class SSLKey : public AbstractCipherKey {
|
|||||||
HMAC_CTX *mac_ctx;
|
HMAC_CTX *mac_ctx;
|
||||||
|
|
||||||
SSLKey(int keySize, int ivLength);
|
SSLKey(int keySize, int ivLength);
|
||||||
|
|
||||||
|
// destructor
|
||||||
~SSLKey() override;
|
~SSLKey() override;
|
||||||
|
|
||||||
|
SSLKey(const SSLKey &src) = delete; // copy constructor
|
||||||
|
SSLKey(SSLKey&& other) = delete; // move constructor
|
||||||
|
SSLKey& operator=(const SSLKey& other) = delete; // copy assignment
|
||||||
|
SSLKey& operator=(SSLKey&& other) = delete; // move assignment
|
||||||
};
|
};
|
||||||
|
|
||||||
SSLKey::SSLKey(int keySize_, int ivLength_) {
|
SSLKey::SSLKey(int keySize_, int ivLength_) {
|
||||||
|
@ -169,8 +169,14 @@ class XmlNode : virtual public XmlValue {
|
|||||||
explicit XmlNode(const tinyxml2::XMLElement *element_)
|
explicit XmlNode(const tinyxml2::XMLElement *element_)
|
||||||
: XmlValue(safeValueForNode(element_)), element(element_) {}
|
: XmlValue(safeValueForNode(element_)), element(element_) {}
|
||||||
|
|
||||||
|
// destructor
|
||||||
~XmlNode() override = default;
|
~XmlNode() override = default;
|
||||||
|
|
||||||
|
XmlNode(const XmlNode &src) = delete; // copy constructor
|
||||||
|
XmlNode(XmlNode&& other) = delete; // move constructor
|
||||||
|
XmlNode& operator=(const XmlNode& other) = delete; // copy assignment
|
||||||
|
XmlNode& operator=(XmlNode&& other) = delete; // move assignment
|
||||||
|
|
||||||
XmlValuePtr find(const char *name) const override {
|
XmlValuePtr find(const char *name) const override {
|
||||||
if (name[0] == '@') {
|
if (name[0] == '@') {
|
||||||
const char *value = element->Attribute(name + 1);
|
const char *value = element->Attribute(name + 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user