Fix -Weffc++ warnings
This commit is contained in:
parent
490936d29d
commit
03ad5cbe45
@ -11,6 +11,8 @@ namespace cryfs {
|
||||
|
||||
class CryCipher {
|
||||
public:
|
||||
virtual ~CryCipher() {}
|
||||
|
||||
virtual const std::string &cipherName() const = 0;
|
||||
virtual const boost::optional<std::string> &warning() const = 0;
|
||||
virtual cpputils::unique_ref<blockstore::BlockStore> createEncryptedBlockstore(cpputils::unique_ref<blockstore::BlockStore> baseBlockStore, const std::string &encKey) const = 0;
|
||||
|
@ -12,7 +12,7 @@ using std::string;
|
||||
namespace cryfs {
|
||||
|
||||
CryConfig::CryConfig(const bf::path &configfile)
|
||||
:_configfile(configfile), _rootBlob(""), _encKey("") {
|
||||
:_configfile(configfile), _rootBlob(""), _encKey(""), _cipher("") {
|
||||
if (bf::exists(_configfile)) {
|
||||
load();
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace cryfs {
|
||||
namespace cachingfsblobstore {
|
||||
|
||||
CachingFsBlobStore::CachingFsBlobStore(unique_ref<FsBlobStore> baseBlobStore)
|
||||
: _baseBlobStore(std::move(baseBlobStore)) {
|
||||
: _baseBlobStore(std::move(baseBlobStore)), _cache() {
|
||||
}
|
||||
|
||||
CachingFsBlobStore::~CachingFsBlobStore() {
|
||||
|
@ -80,7 +80,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
fsblobstore::DirBlob *_base;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DirBlobRef);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -45,7 +45,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
fsblobstore::FileBlob *_base;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(FileBlobRef);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,10 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
fsblobstore::SymlinkBlob *_base;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SymlinkBlobRef);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace cryfs {
|
||||
namespace fsblobstore {
|
||||
|
||||
DirBlob::DirBlob(unique_ref<Blob> blob, std::function<off_t (const blockstore::Key&)> getLstatSize) :
|
||||
FsBlob(std::move(blob)), _getLstatSize(getLstatSize), _entries(), _changed(false) {
|
||||
FsBlob(std::move(blob)), _getLstatSize(getLstatSize), _entries(), _mutex(), _changed(false) {
|
||||
ASSERT(magicNumber() == MagicNumbers::DIR, "Loaded blob is not a directory");
|
||||
_readEntriesFromBlob();
|
||||
}
|
||||
|
@ -73,6 +73,8 @@ public:
|
||||
|
||||
private:
|
||||
cachingfsblobstore::DirBlobRef *_base;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DirBlobRef);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ public:
|
||||
|
||||
private:
|
||||
cachingfsblobstore::FileBlobRef *_base;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(FileBlobRef);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ public:
|
||||
|
||||
private:
|
||||
cachingfsblobstore::SymlinkBlobRef *_base;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SymlinkBlobRef);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -17,9 +17,18 @@ ProgramOptions::ProgramOptions(const string &baseDir, const string &mountDir, co
|
||||
_fuseOptions.insert(_fuseOptions.begin()+1, _mountDir);
|
||||
}
|
||||
|
||||
ProgramOptions::ProgramOptions(ProgramOptions &&rhs)
|
||||
:_baseDir(std::move(rhs._baseDir)), _mountDir(std::move(rhs._mountDir)), _configFile(std::move(rhs._configFile)),
|
||||
_foreground(std::move(rhs._foreground)), _logFile(std::move(rhs._logFile)),
|
||||
_fuseOptions(std::move(rhs._fuseOptions)) {
|
||||
rhs._mountDir = nullptr;
|
||||
}
|
||||
|
||||
ProgramOptions::~ProgramOptions() {
|
||||
if (_mountDir != nullptr) {
|
||||
delete[] _mountDir;
|
||||
}
|
||||
}
|
||||
|
||||
const string &ProgramOptions::baseDir() const {
|
||||
return _baseDir;
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <boost/optional.hpp>
|
||||
#include <messmer/cpp-utils/macros.h>
|
||||
|
||||
namespace cryfs {
|
||||
namespace program_options {
|
||||
@ -13,6 +14,7 @@ namespace cryfs {
|
||||
ProgramOptions(const std::string &baseDir, const std::string &mountDir, const std::string &configFile,
|
||||
bool foreground, const boost::optional<std::string> &logFile,
|
||||
const std::vector<char *> &fuseOptions);
|
||||
ProgramOptions(ProgramOptions &&rhs);
|
||||
~ProgramOptions();
|
||||
|
||||
const std::string &baseDir() const;
|
||||
@ -29,6 +31,8 @@ namespace cryfs {
|
||||
bool _foreground;
|
||||
boost::optional<std::string> _logFile;
|
||||
std::vector<char *> _fuseOptions;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ProgramOptions);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user