UI: App: Simplify isOptionsEqual()

This commit is contained in:
Nodir Temirkhodjaev 2024-03-29 14:57:10 +03:00
parent ce30aeeaff
commit 6201f65d02
2 changed files with 13 additions and 7 deletions

View File

@ -12,22 +12,27 @@ bool App::isBaseFlagsEqual(const App &o) const
&& parked == o.parked;
}
bool App::isZonesEqual(const App &o) const
{
return acceptZones == o.acceptZones && rejectZones == o.rejectZones;
}
bool App::isExtraFlagsEqual(const App &o) const
{
return logBlocked == o.logBlocked && logConn == o.logConn && blocked == o.blocked
&& killProcess == o.killProcess;
}
bool App::isZonesEqual(const App &o) const
{
return acceptZones == o.acceptZones && rejectZones == o.rejectZones;
}
bool App::isPathsEqual(const App &o) const
{
return appOriginPath == o.appOriginPath && appPath == o.appPath;
}
bool App::isOptionsEqual(const App &o) const
{
return isFlagsEqual(o) && isZonesEqual(o) && groupIndex == o.groupIndex && ruleId == o.ruleId
&& appOriginPath == o.appOriginPath && appPath == o.appPath && notes == o.notes
&& scheduleAction == o.scheduleAction && scheduleTime == o.scheduleTime;
&& isPathsEqual(o) && notes == o.notes && scheduleAction == o.scheduleAction
&& scheduleTime == o.scheduleTime;
}
bool App::isNameEqual(const App &o) const

View File

@ -18,6 +18,7 @@ public:
bool isBaseFlagsEqual(const App &o) const;
bool isExtraFlagsEqual(const App &o) const;
bool isZonesEqual(const App &o) const;
bool isPathsEqual(const App &o) const;
bool isOptionsEqual(const App &o) const;
bool isNameEqual(const App &o) const;