mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 18:17:08 -07:00
Improve coding style
This commit is contained in:
parent
acad35c5bc
commit
c41df9ffbd
147 changed files with 4454 additions and 2227 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue