mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove unused Plugin::GetFileSize function
This commit is contained in:
@@ -417,13 +417,6 @@ bool Plugin::IsValid(const GameType gameType,
|
||||
return false;
|
||||
}
|
||||
|
||||
uintmax_t Plugin::GetFileSize(std::filesystem::path pluginPath) {
|
||||
if (!std::filesystem::exists(pluginPath))
|
||||
pluginPath += GHOST_FILE_EXTENSION;
|
||||
|
||||
return std::filesystem::file_size(pluginPath);
|
||||
}
|
||||
|
||||
void Plugin::Load(const std::filesystem::path& path,
|
||||
GameType gameType,
|
||||
bool headerOnly) {
|
||||
|
||||
@@ -88,7 +88,6 @@ public:
|
||||
// Validity checks.
|
||||
static bool IsValid(const GameType gameType,
|
||||
const std::filesystem::path& pluginPath);
|
||||
static uintmax_t GetFileSize(std::filesystem::path pluginPath);
|
||||
|
||||
private:
|
||||
void Load(const std::filesystem::path& path,
|
||||
|
||||
@@ -465,22 +465,6 @@ TEST_P(
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(PluginTest, getFileSizeShouldThrowForAMissingPlugin) {
|
||||
EXPECT_THROW(Plugin::GetFileSize(game_.DataPath() / missingEsp),
|
||||
std::filesystem::filesystem_error);
|
||||
}
|
||||
|
||||
TEST_P(PluginTest, getFileSizeShouldReturnCorrectValueForAPlugin) {
|
||||
EXPECT_EQ(getNonAsciiEspFileSize(),
|
||||
Plugin::GetFileSize(game_.DataPath() /
|
||||
std::filesystem::u8path(nonAsciiEsp)));
|
||||
}
|
||||
|
||||
TEST_P(PluginTest, getFileSizeShouldReturnCorrectValueForAGhostedPlugin) {
|
||||
EXPECT_EQ(getGhostedPluginFileSize(),
|
||||
Plugin::GetFileSize(game_.DataPath() / blankMasterDependentEsm));
|
||||
}
|
||||
|
||||
TEST_P(PluginTest,
|
||||
doRecordsOverlapShouldReturnFalseIfTheArgumentIsNotAPluginObject) {
|
||||
Plugin plugin1(
|
||||
|
||||
Reference in New Issue
Block a user