Remove dead code

Remove some dead code in ScheduledDowntime::CreateNextDowntime().
This commit is contained in:
Edgar Fuß 2018-10-18 18:09:20 +02:00 committed by GitHub
parent e4e28421e8
commit fa3e5c8c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -181,15 +181,8 @@ void ScheduledDowntime::CreateNextDowntime()
std::pair<double, double> segment = FindNextSegment();
if (segment.first == 0 && segment.second == 0) {
tm reference = Utility::LocalTime(Utility::GetTime());
reference.tm_mday++;
reference.tm_hour = 0;
reference.tm_min = 0;
reference.tm_sec = 0;
if (segment.first == 0 && segment.second == 0)
return;
}
String downtimeName = Downtime::AddDowntime(GetCheckable(), GetAuthor(), GetComment(),
segment.first, segment.second,
@ -261,4 +254,4 @@ void ScheduledDowntime::ValidateChildOptions(const Lazy<Value>& lvalue, const Va
} catch (const std::exception&) {
BOOST_THROW_EXCEPTION(ValidationError(this, { "child_options" }, "Invalid child_options specified"));
}
}
}