Forbid instanciation of static classes

This commit is contained in:
Leonetienne 2022-05-31 14:28:17 +02:00
parent 2f6df42696
commit 6a14b7b428
No known key found for this signature in database
GPG Key ID: C33879CD92E9708C
6 changed files with 20 additions and 2 deletions

View File

@ -16,9 +16,10 @@ private:
static void CrashWithMsg(const std::string& msg); static void CrashWithMsg(const std::string& msg);
static void CatchVersionQueries(); static void CatchVersionQueries();
CommandlineInterface() {};
static Hazelnp::CmdArgsInterface nupp; static Hazelnp::CmdArgsInterface nupp;
// No instanciation! >:(
CommandlineInterface() {};
}; };
#endif #endif

View File

@ -46,6 +46,9 @@ class Configuration {
static void DecideOutputTo(); static void DecideOutputTo();
static void DecideIOBaseFormat(); static void DecideIOBaseFormat();
static void DecideModule(); static void DecideModule();
// No instanciation! >:(
Configuration() {};
}; };
#endif #endif

View File

@ -49,6 +49,9 @@ class DataFormatter {
const std::vector<std::string>& customSet, const std::vector<std::string>& customSet,
const std::string& seperator = "" const std::string& seperator = ""
); );
// No instanciation! >:(
DataFormatter() {};
}; };
#endif #endif

View File

@ -44,6 +44,9 @@ namespace IO {
// All read blocks, that haven't been given out yet // All read blocks, that haven't been given out yet
static std::queue<Block> blocks; static std::queue<Block> blocks;
// No instanciation! >:(
DataIngestionLayer();
}; };
} }

View File

@ -19,7 +19,11 @@ class KeyManager {
//! hiding the input. //! hiding the input.
static std::string PasswordPrompt(); static std::string PasswordPrompt();
//! The encryption key
static Key key; static Key key;
// No instanciation! >:(
KeyManager() {};
}; };
#endif #endif

View File

@ -8,6 +8,10 @@ namespace Module {
public: public:
//! Will write the key to a file //! Will write the key to a file
static void Run(); static void Run();
private:
// No instanciation! >:(
GenerateKey() {};
}; };
} }