Skip to content

Commit

Permalink
scheduler: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed May 16, 2024
1 parent 8735f4d commit 865c7bf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions code/espurna/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ constexpr bool restore() {
}

constexpr int restoreDays() {
return SCHEDULER_RESTORE_DAYS;
return SCHEDULER_RESTORE_DAYS;
}

#if SCHEDULER_SUN_SUPPORT
Expand Down Expand Up @@ -172,7 +172,7 @@ String serialize(scheduler::v1::Type type) {
return serialize(scheduler::settings::internal::v1::Types, type);
}

} // namespace internal
} // namespace internal
} // namespace settings
} // namespace espurna

Expand Down Expand Up @@ -527,7 +527,7 @@ String convert_action(Type type, int target, int action) {
if (prefix.length()) {
out += prefix.toString()
+ ' ';
out += String(target, 10)
out += String(target, 10)
+ ' '
+ String(action, 10);
}
Expand Down Expand Up @@ -1395,7 +1395,7 @@ void setup() {

} // namespace
} // namespace scheduler
} // namespace espurna
} // namespace espurna

// -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion code/espurna/scheduler_common.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool match(const DateMatch& lhs, const tm& rhs) {
return lhs.day_index[datetime::day_index(rhs.tm_mday)];
}

if (lhs.day[0]) {
if (lhs.day[0]) {
const auto day = datetime::last_day(rhs);
if (lhs.day.count() > 1) {
return lhs.day[1 + day - rhs.tm_mday];
Expand Down
4 changes: 2 additions & 2 deletions code/espurna/scheduler_sun.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ float atan(float x) {

xPower *= xSquared;
accumulator += -0.00749305860992 * xPower;

return offset + x / accumulator;
}

Expand Down Expand Up @@ -146,7 +146,7 @@ double fmod(double x, double y) {
return fs_fmod(x, y);
}

#else
#else
// Everything from stdlib calc below needs
Expand Down
8 changes: 4 additions & 4 deletions code/espurna/scheduler_time.re
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ loop:
goto consume_last;
}
* {
* {
out = false;
goto return_out;
}
Expand Down Expand Up @@ -156,7 +156,7 @@ take_range:
last = -1;

goto loop;

consume_last:
// validate w/ range
if ((last != -1) && !range.valid(last)) {
Expand Down Expand Up @@ -288,7 +288,7 @@ loop:
goto consume_last;
}
* {
* {
out = false;
goto return_out;
}
Expand Down Expand Up @@ -316,7 +316,7 @@ take_range:
}

goto return_out;

consume_last:
// fill output with {range_last}..{last}
// similar to generic range parser, support inverse fill
Expand Down
8 changes: 4 additions & 4 deletions code/espurna/scheduler_time.re.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ yy1:
++YYCURSOR;
yy2:
#line 110 "espurna/scheduler_time.re"
{
{
out = false;
goto return_out;
}
Expand Down Expand Up @@ -200,7 +200,7 @@ take_range:
last = -1;

goto loop;

consume_last:
// validate w/ range
if ((last != -1) && !range.valid(last)) {
Expand Down Expand Up @@ -300,7 +300,7 @@ yy12:
++YYCURSOR;
yy13:
#line 291 "espurna/scheduler_time.re"
{
{
out = false;
goto return_out;
}
Expand Down Expand Up @@ -737,7 +737,7 @@ take_range:
}

goto return_out;

consume_last:
// fill output with {range_last}..{last}
// similar to generic range parser, support inverse fill
Expand Down

0 comments on commit 865c7bf

Please sign in to comment.