mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 10:56:57 +03:00
chore(clang-tidy): modernize the code
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
2e45d135c5
commit
effa8bedb1
42 changed files with 854 additions and 786 deletions
|
|
@ -22,7 +22,7 @@ ModModel::ModModel(BaseInstance& base_inst, ResourceAPI* api, QString debugName,
|
|||
|
||||
ResourceAPI::SearchArgs ModModel::createSearchArguments()
|
||||
{
|
||||
auto profile = static_cast<MinecraftInstance const&>(m_base_instance).getPackProfile();
|
||||
auto profile = static_cast<const MinecraftInstance&>(m_base_instance).getPackProfile();
|
||||
|
||||
Q_ASSERT(profile);
|
||||
Q_ASSERT(m_filter);
|
||||
|
|
@ -50,7 +50,7 @@ ResourceAPI::SearchArgs ModModel::createSearchArguments()
|
|||
ResourceAPI::VersionSearchArgs ModModel::createVersionsArguments(const QModelIndex& entry)
|
||||
{
|
||||
auto pack = m_packs[entry.row()];
|
||||
auto profile = static_cast<MinecraftInstance const&>(m_base_instance).getPackProfile();
|
||||
auto profile = static_cast<const MinecraftInstance&>(m_base_instance).getPackProfile();
|
||||
|
||||
Q_ASSERT(profile);
|
||||
Q_ASSERT(m_filter);
|
||||
|
|
@ -128,7 +128,7 @@ bool ModModel::checkVersionFilters(const ModPlatform::IndexedVersion& v)
|
|||
(!loaders.has_value() || !v.loaders || loaders.value() & v.loaders) && // loaders
|
||||
checkSide(m_filter->side, v.side) && // side
|
||||
(m_filter->releases.empty() || // releases
|
||||
std::find(m_filter->releases.cbegin(), m_filter->releases.cend(), v.version_type) != m_filter->releases.cend()) &&
|
||||
std::find(m_filter->releases.cbegin(), m_filter->releases.cend(), v.versionType) != m_filter->releases.cend()) &&
|
||||
m_filter->checkMcVersions(v.mcVersion)); // mcVersions
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue