mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 15:33:16 +01:00
modernize: use override, using aliases
This commit is contained in:
parent
71e2bcc84d
commit
7a4e0c41db
@ -56,7 +56,7 @@ struct CipherAlg {
|
||||
Range blockSize;
|
||||
};
|
||||
|
||||
typedef multimap<string, CipherAlg> CipherMap_t;
|
||||
using CipherMap_t = multimap<string, CipherAlg>;
|
||||
static CipherMap_t *gCipherMap = nullptr;
|
||||
|
||||
std::list<Cipher::CipherAlgorithm> Cipher::GetAlgorithmList(
|
||||
|
@ -44,8 +44,8 @@ class Cipher {
|
||||
public:
|
||||
// if no key length was indicated when cipher was registered, then keyLen
|
||||
// <= 0 will be used.
|
||||
typedef std::shared_ptr<Cipher> (*CipherConstructor)(const Interface &iface,
|
||||
int keyLenBits);
|
||||
using CipherConstructor = std::shared_ptr<Cipher> (*)(const Interface &iface,
|
||||
int keyLenBits);
|
||||
|
||||
struct CipherAlgorithm {
|
||||
std::string name;
|
||||
@ -55,7 +55,7 @@ class Cipher {
|
||||
Range blockSize;
|
||||
};
|
||||
|
||||
typedef std::list<CipherAlgorithm> AlgorithmList;
|
||||
using AlgorithmList = std::list<CipherAlgorithm>;
|
||||
static AlgorithmList GetAlgorithmList(bool includeHidden = false);
|
||||
|
||||
static std::shared_ptr<Cipher> New(const Interface &iface, int keyLen = -1);
|
||||
|
@ -31,7 +31,7 @@ class AbstractCipherKey {
|
||||
virtual ~AbstractCipherKey();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<AbstractCipherKey> CipherKey;
|
||||
using CipherKey = std::shared_ptr<AbstractCipherKey>;
|
||||
|
||||
} // namespace encfs
|
||||
|
||||
|
@ -85,8 +85,8 @@ class EncFS_Context {
|
||||
* us.
|
||||
*/
|
||||
|
||||
typedef std::unordered_map<std::string, std::list<std::shared_ptr<FileNode>>>
|
||||
FileMap;
|
||||
using FileMap =
|
||||
std::unordered_map<std::string, std::list<std::shared_ptr<FileNode>>>;
|
||||
|
||||
mutable pthread_mutex_t contextMutex;
|
||||
FileMap openFiles;
|
||||
|
@ -130,7 +130,7 @@ struct FSConfig {
|
||||
: forceDecode(false), reverseEncryption(false), idleTracking(false) {}
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<FSConfig> FSConfigPtr;
|
||||
using FSConfigPtr = std::shared_ptr<FSConfig>;
|
||||
|
||||
} // namespace encfs
|
||||
|
||||
|
@ -60,7 +60,7 @@ struct EncFS_Root {
|
||||
~EncFS_Root();
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<EncFS_Root> RootPtr;
|
||||
using RootPtr = std::shared_ptr<EncFS_Root>;
|
||||
|
||||
enum ConfigMode { Config_Prompt, Config_Standard, Config_Paranoia };
|
||||
|
||||
|
@ -55,7 +55,7 @@ struct NameIOAlg {
|
||||
Interface iface;
|
||||
};
|
||||
|
||||
typedef multimap<string, NameIOAlg> NameIOMap_t;
|
||||
using NameIOMap_t = multimap<string, NameIOAlg>;
|
||||
static NameIOMap_t *gNameIOMap = nullptr;
|
||||
|
||||
list<NameIO::Algorithm> NameIO::GetAlgorithmList(bool includeHidden) {
|
||||
|
@ -37,7 +37,7 @@ class Cipher;
|
||||
|
||||
class NameIO {
|
||||
public:
|
||||
typedef std::shared_ptr<NameIO> (*Constructor)(
|
||||
using Constructor = std::shared_ptr<NameIO> (*)(
|
||||
const Interface &iface, const std::shared_ptr<Cipher> &cipher,
|
||||
const CipherKey &key);
|
||||
|
||||
@ -47,7 +47,7 @@ class NameIO {
|
||||
Interface iface;
|
||||
};
|
||||
|
||||
typedef std::list<Algorithm> AlgorithmList;
|
||||
using AlgorithmList = std::list<Algorithm>;
|
||||
static AlgorithmList GetAlgorithmList(bool includeHidden = false);
|
||||
|
||||
static std::shared_ptr<NameIO> New(const Interface &iface,
|
||||
|
@ -50,7 +50,7 @@ static bool NullCipher_registered = Cipher::Register(
|
||||
class NullKey : public AbstractCipherKey {
|
||||
public:
|
||||
NullKey() = default;
|
||||
virtual ~NullKey() = default;
|
||||
~NullKey() override = default;
|
||||
};
|
||||
|
||||
class NullDestructor {
|
||||
|
@ -238,7 +238,7 @@ class SSLKey : public AbstractCipherKey {
|
||||
HMAC_CTX *mac_ctx;
|
||||
|
||||
SSLKey(int keySize, int ivLength);
|
||||
~SSLKey();
|
||||
~SSLKey() override;
|
||||
};
|
||||
|
||||
SSLKey::SSLKey(int keySize_, int ivLength_) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef EVP_CIPHER
|
||||
struct evp_cipher_st;
|
||||
|
||||
typedef struct evp_cipher_st EVP_CIPHER;
|
||||
using EVP_CIPHER = struct evp_cipher_st;
|
||||
#endif
|
||||
|
||||
namespace encfs {
|
||||
|
@ -139,9 +139,9 @@ class XmlNode : virtual public XmlValue {
|
||||
XmlNode(const tinyxml2::XMLElement *element_)
|
||||
: XmlValue(safeValueForNode(element_)), element(element_) {}
|
||||
|
||||
virtual ~XmlNode() = default;
|
||||
~XmlNode() override = default;
|
||||
|
||||
virtual XmlValuePtr find(const char *name) const {
|
||||
XmlValuePtr find(const char *name) const override {
|
||||
if (name[0] == '@') {
|
||||
const char *value = element->Attribute(name + 1);
|
||||
if (value)
|
||||
|
@ -29,7 +29,7 @@
|
||||
namespace encfs {
|
||||
|
||||
class XmlValue;
|
||||
typedef std::shared_ptr<XmlValue> XmlValuePtr;
|
||||
using XmlValuePtr = std::shared_ptr<XmlValue>;
|
||||
|
||||
class XmlValue {
|
||||
std::string value;
|
||||
|
Loading…
Reference in New Issue
Block a user