diff --git a/src/Config.cpp b/src/Config.cpp index 2144b1039fa30d80f958db75a0ab329ab0156980..37b88d4ef1cdcc4adfaa24f6eeae8561817168ec 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -24,7 +24,7 @@ Config::Config(std::string configPath, std::string type) bool Config::readConfigFile(std::string configPath) { - std::ifstream file(configPath.c_str(), std::ios::in); + std::ifstream file(configPath.c_str()); if (!file.is_open()) { @@ -216,7 +216,7 @@ std::vector<std::string> Config::splitValue(Vita::string str, Vita::string onlyE std::vector<std::string> final; for (auto&& iterator = work.begin(); iterator != work.end(); - iterator++) + ++iterator) { if (("" != *iterator) && onlyEnding.empty()) { diff --git a/src/Mhwd.cpp b/src/Mhwd.cpp index 5160608085227599cef204cf1657bd24dfdff91b..925c334ff2d28f791240bbf44f3bbcad5b8f0f12 100644 --- a/src/Mhwd.cpp +++ b/src/Mhwd.cpp @@ -1255,7 +1255,7 @@ int Mhwd::launch(int argc, char *argv[]) } else { - config_ .reset(new Config(filepath, operationType)); + config_.reset(new Config(filepath, operationType)); if (!data_.fillConfig(config_, filepath, operationType)) { printer_.printError("failed to read custom config '" + filepath + "'!"); diff --git a/src/Transaction.hpp b/src/Transaction.hpp index 35176ba0b2c400bd7f10e0131704d96dd09ae5ff..ee2155be89a5fad5b49855a03d8d25e1224a5fb8 100644 --- a/src/Transaction.hpp +++ b/src/Transaction.hpp @@ -18,7 +18,8 @@ class Transaction { public: Transaction() = delete; - Transaction(Data data, std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE type, bool allowReinstallation); + Transaction(Data data, std::shared_ptr<Config> config, MHWD::TRANSACTIONTYPE type, + bool allowReinstallation); bool isAllowedToReinstall() const; std::shared_ptr<Config> config_; @@ -27,6 +28,7 @@ public: std::vector<std::shared_ptr<Config>> conflictedConfigs_; std::vector<std::shared_ptr<Config>> configsRequirements_; +private: bool allowedToReinstall_ = false; };