Remove unused Plugin::GetFileSize function

This commit is contained in:
Oliver Hamlet
2023-08-23 19:48:20 +01:00
parent 46f28eef07
commit 74aeb3c54b
3 changed files with 0 additions and 24 deletions
-7
View File
@@ -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) {
-1
View File
@@ -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,
-16
View File
@@ -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(