Improve coding style

This commit is contained in:
Vladimir Golovnev (Glassez) 2020-11-16 10:02:11 +03:00
commit c41df9ffbd
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
147 changed files with 4454 additions and 2227 deletions

View file

@ -65,13 +65,16 @@ bool BandwidthScheduler::isTimeForAlternative() const
const int day = QDate::currentDate().dayOfWeek();
bool alternative = false;
if (start > end) {
if (start > end)
{
std::swap(start, end);
alternative = true;
}
if ((start <= now) && (end >= now)) {
switch (schedulerDays) {
if ((start <= now) && (end >= now))
{
switch (schedulerDays)
{
case EVERY_DAY:
alternative = !alternative;
break;
@ -96,7 +99,8 @@ void BandwidthScheduler::onTimeout()
{
const bool alternative = isTimeForAlternative();
if (alternative != m_lastAlternative) {
if (alternative != m_lastAlternative)
{
m_lastAlternative = alternative;
emit bandwidthLimitRequested(alternative);
}