mirror of https://github.com/PCSX2/pcsx2.git
UI-Files: Codacy fix codacy errors and warnings
This commit is contained in:
parent
f841a8ba58
commit
93f4277b3c
|
@ -76,7 +76,7 @@ static std::time_t ConvertFileTimeToUnixTime(const FILETIME& ft)
|
|||
|
||||
static inline bool FileSystemCharacterIsSane(char c, bool StripSlashes)
|
||||
{
|
||||
if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9') && c != ' ' && c != ' ' &&
|
||||
if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9') && c != ' ' &&
|
||||
c != '_' && c != '-' && c != '.')
|
||||
{
|
||||
if (!StripSlashes && (c == '/' || c == '\\'))
|
||||
|
|
|
@ -180,7 +180,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
|
|||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_ui.trilinearFiltering, "EmuCore/GS", "UserHacks_TriFilter", static_cast<int>(TriFiltering::Automatic), -1);
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(
|
||||
sif, m_ui.anisotropicFiltering, "EmuCore/GS", "MaxAnisotropy", s_anisotropic_filtering_entries, s_anisotropic_filtering_values, "1");
|
||||
sif, m_ui.anisotropicFiltering, "EmuCore/GS", "MaxAnisotropy", s_anisotropic_filtering_entries, s_anisotropic_filtering_values, "0");
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.dithering, "EmuCore/GS", "dithering_ps2", 2);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.mipmapping, "EmuCore/GS", "mipmap_hw", static_cast<int>(HWMipmapLevel::Automatic), -1);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.crcFixLevel, "EmuCore/GS", "crc_hack_level", static_cast<int>(CRCHackLevel::Automatic), -1);
|
||||
|
|
|
@ -655,8 +655,6 @@ void ImGuiManager::DrawPerformanceOverlay()
|
|||
text += " (Max)";
|
||||
else
|
||||
fmt::format_to(std::back_inserter(text), " ({:.0f}%)", EmuConfig.GS.LimitScalar * 100.0);
|
||||
|
||||
first = false;
|
||||
}
|
||||
if (!text.empty())
|
||||
{
|
||||
|
|
|
@ -159,7 +159,7 @@ void GameDatabase::parseAndInsert(const std::string_view& serial, const c4::yml:
|
|||
if (StringUtil::EndsWith(fix, "Hack"))
|
||||
{
|
||||
fix.erase(fix.size() - 4);
|
||||
for (GamefixId id = GamefixId_FIRST; id < pxEnumEnd; id++)
|
||||
for (GamefixId id = GamefixId_FIRST; id < pxEnumEnd; ++id)
|
||||
{
|
||||
if (fix.compare(EnumToString(id)) == 0 &&
|
||||
std::find(gameEntry.gameFixes.begin(), gameEntry.gameFixes.end(), id) == gameEntry.gameFixes.end())
|
||||
|
@ -190,7 +190,7 @@ void GameDatabase::parseAndInsert(const std::string_view& serial, const c4::yml:
|
|||
if (StringUtil::EndsWith(speedHack, "SpeedHack"))
|
||||
{
|
||||
speedHack.erase(speedHack.size() - 9);
|
||||
for (SpeedhackId id = SpeedhackId_FIRST; id < pxEnumEnd; id++)
|
||||
for (SpeedhackId id = SpeedhackId_FIRST; id < pxEnumEnd; ++id)
|
||||
{
|
||||
if (speedHack.compare(EnumToString(id)) == 0 &&
|
||||
std::none_of(gameEntry.speedHacks.begin(), gameEntry.speedHacks.end(), [id](const auto& it) { return it.first == id; }))
|
||||
|
|
Loading…
Reference in New Issue