mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Removed some dead code.
This commit is contained in:
+6
-10
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user