Skip to content

Commit

Permalink
maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
adya authored and github-actions[bot] committed Mar 25, 2024
1 parent 51178fa commit de12de1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion SPID/include/FormData.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ namespace Forms

form = as_form(anyForm);
if (!form) {
throw MismatchingFormTypeException(anyForm->GetFormType(), Form::FORMTYPE, FormModPair{*formID, modName}, path);
throw MismatchingFormTypeException(anyForm->GetFormType(), Form::FORMTYPE, FormModPair{ *formID, modName }, path);
}

if constexpr (std::is_same_v<Form, RE::BGSKeyword>) {
Expand Down
11 changes: 5 additions & 6 deletions SPID/include/LinkedDistribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace LinkedDistribution
/// Raw filters in RawLinkedForm only use MATCH, there is no meaning for ALL or NOT, so they are ignored.
Filters<FormOrEditorID> formIDs{};

IndexOrCount idxOrCount { RandomCount(1, 1) };
Chance chance{ 100 };
IndexOrCount idxOrCount{ RandomCount(1, 1) };
Chance chance{ 100 };

std::string path{};
};
Expand All @@ -32,10 +32,9 @@ namespace LinkedDistribution
bool TryParse(const std::string& a_key, const std::string& a_value, const std::string& a_path);
}


class Manager;
template<class Form>

template <class Form>
struct LinkedForms;

namespace detail
Expand All @@ -58,7 +57,7 @@ namespace LinkedDistribution
type(type)
{}

RECORD::TYPE GetType() const { return type; }
RECORD::TYPE GetType() const { return type; }
const FormsMap& GetForms() const { return forms; }

void LookupForms(RE::TESDataHandler* const dataHandler, INI::LinkedFormsVec& rawLinkedForms);
Expand Down
4 changes: 2 additions & 2 deletions SPID/include/LookupConfigs.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ namespace RECORD
};
}

inline constexpr std::string_view GetTypeName(const TYPE aType)
inline constexpr std::string_view GetTypeName(const TYPE aType)
{
return detail::add.at(aType);
}

inline constexpr TYPE GetType(const std::string& aType)
inline constexpr TYPE GetType(const std::string& aType)
{
using namespace detail;
return static_cast<TYPE>(std::distance(add.begin(), std::find(add.begin(), add.end(), aType)));
Expand Down
4 changes: 2 additions & 2 deletions SPID/src/LinkedDistribution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ namespace LinkedDistribution
if (!a_key.starts_with("Linked"sv)) {
return false;
}

std::string rawType = a_key.substr(6);
auto type = RECORD::GetType(rawType);
auto type = RECORD::GetType(rawType);
if (type == RECORD::kTotal) {
logger::warn("IGNORED: Invalid Linked Form type: {}"sv, rawType);
return true;
Expand Down

0 comments on commit de12de1

Please sign in to comment.