mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove ApplyLoadOrder from API
It just passes through to libloadorder, there's no added value from having it part of LOOT's API.
This commit is contained in:
@@ -88,13 +88,6 @@ public:
|
||||
*/
|
||||
virtual std::vector<std::string> SortPlugins() = 0;
|
||||
|
||||
/**
|
||||
* @brief Applies the given load order.
|
||||
* @param loadOrder
|
||||
* A vector of plugin filenames in the load order to be set.
|
||||
*/
|
||||
virtual void ApplyLoadOrder(const std::vector<std::string>& loadOrder) = 0;
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @name Masterlist Update
|
||||
|
||||
@@ -102,10 +102,6 @@ std::vector<std::string> ApiDatabase::SortPlugins() {
|
||||
return loadOrder;
|
||||
}
|
||||
|
||||
void ApiDatabase::ApplyLoadOrder(const std::vector<std::string>& loadOrder) {
|
||||
game_.SetLoadOrder(loadOrder);
|
||||
}
|
||||
|
||||
bool ApiDatabase::UpdateMasterlist(const std::string& masterlistPath,
|
||||
const std::string& remoteURL,
|
||||
const std::string& remoteBranch) {
|
||||
|
||||
@@ -45,8 +45,6 @@ struct ApiDatabase : public DatabaseInterface {
|
||||
|
||||
std::vector<std::string> SortPlugins();
|
||||
|
||||
void ApplyLoadOrder(const std::vector<std::string>& loadOrder);
|
||||
|
||||
bool UpdateMasterlist(const std::string& masterlist_path,
|
||||
const std::string& remote_url,
|
||||
const std::string& remote_branch);
|
||||
|
||||
@@ -176,24 +176,6 @@ TEST_P(DatabaseInterfaceTest, sortPluginsShouldSucceedIfPassedValidArguments) {
|
||||
ASSERT_EQ(expectedOrder, actualOrder);
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, applyLoadOrderShouldReturnOkIfLoadOrderGivenIsNotEmpty) {
|
||||
std::vector<std::string> loadOrder = {
|
||||
masterFile,
|
||||
blankEsm,
|
||||
blankMasterDependentEsm,
|
||||
blankDifferentEsm,
|
||||
blankDifferentMasterDependentEsm,
|
||||
blankMasterDependentEsp,
|
||||
blankDifferentMasterDependentEsp,
|
||||
blankEsp,
|
||||
blankPluginDependentEsp,
|
||||
blankDifferentEsp,
|
||||
blankDifferentPluginDependentEsp,
|
||||
};
|
||||
|
||||
EXPECT_NO_THROW(db_->ApplyLoadOrder(loadOrder));
|
||||
}
|
||||
|
||||
TEST_P(DatabaseInterfaceTest, updateMasterlistShouldReturnAnInvalidArgsErrorIfTheMasterlistPathGivenIsInvalid) {
|
||||
EXPECT_ANY_THROW(db_->UpdateMasterlist(";//\?", url_, branch_));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user