Removed some dead code.

This commit is contained in:
WrinklyNinja
2014-03-20 00:29:45 +00:00
parent bd97167459
commit b57c60111f
4 changed files with 6 additions and 37 deletions
+6 -10
View File
@@ -146,11 +146,9 @@ namespace loot {
string path;
string key_parent = fs::path(registryKey).parent_path().string();
string key_name = fs::path(registryKey).filename().string();
if (RegKeyExists("HKEY_LOCAL_MACHINE", key_parent, key_name)) {
path = RegKeyStringValue("HKEY_LOCAL_MACHINE", key_parent, key_name);
if (fs::exists(fs::path(path) / "Data" / _masterFile))
gamePath = fs::path(path);
}
path = RegKeyStringValue("HKEY_LOCAL_MACHINE", key_parent, key_name);
if (!path.empty() && fs::exists(fs::path(path) / "Data" / _masterFile))
gamePath = fs::path(path);
}
}
@@ -176,11 +174,9 @@ namespace loot {
string path;
string key_parent = fs::path(registryKey).parent_path().string();
string key_name = fs::path(registryKey).filename().string();
if (RegKeyExists("HKEY_LOCAL_MACHINE", key_parent, key_name)) {
path = RegKeyStringValue("HKEY_LOCAL_MACHINE", key_parent, key_name);
if (fs::exists(fs::path(path) / "Data" / _masterFile))
return true;
}
path = RegKeyStringValue("HKEY_LOCAL_MACHINE", key_parent, key_name);
if (!path.empty() && fs::exists(fs::path(path) / "Data" / _masterFile))
return true;
return false;
}
-13
View File
@@ -160,19 +160,6 @@ namespace loot {
return out;
}
//Converts a boolean to a string representation (true/false)
std::string BoolToString(const bool b) {
if (b)
return "true";
else
return "false";
}
//Check if registry subkey exists.
bool RegKeyExists(const std::string& keyStr, const std::string& subkey, const std::string& value) {
return !RegKeyStringValue(keyStr, subkey, value).empty();
}
//Get registry subkey value string.
string RegKeyStringValue(const std::string& keyStr, const std::string& subkey, const std::string& value) {
#if _WIN32 || _WIN64
-6
View File
@@ -51,12 +51,6 @@ namespace loot {
//Converts an integer to a hex string using BOOST's Spirit.Karma. Faster than a stringstream conversion.
std::string IntToHexString(const int n);
//Converts a boolean to a string representation (true/false)
std::string BoolToString(const bool b);
//Check if registry subkey exists.
bool RegKeyExists(const std::string& keyStr, const std::string& subkey, const std::string& value);
//Get registry subkey value string.
std::string RegKeyStringValue(const std::string& keyStr, const std::string& subkey, const std::string& value);
-8
View File
@@ -242,14 +242,6 @@ namespace loot {
size_t numOverrideRecords;
};
struct plugin_hash : std::unary_function<Plugin, size_t> {
inline size_t operator () (const Plugin& p) const {
size_t seed = 0;
boost::hash_combine(seed, p.Name());
return seed;
}
};
bool operator == (const File& lhs, const Plugin& rhs);
bool operator == (const Plugin& lhs, const File& rhs);