mirror of https://github.com/Icinga/icinga2.git
Remove dead code
Remove some dead code in ScheduledDowntime::CreateNextDowntime().
This commit is contained in:
parent
e4e28421e8
commit
fa3e5c8c31
|
@ -181,15 +181,8 @@ void ScheduledDowntime::CreateNextDowntime()
|
||||||
|
|
||||||
std::pair<double, double> segment = FindNextSegment();
|
std::pair<double, double> segment = FindNextSegment();
|
||||||
|
|
||||||
if (segment.first == 0 && segment.second == 0) {
|
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;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
String downtimeName = Downtime::AddDowntime(GetCheckable(), GetAuthor(), GetComment(),
|
String downtimeName = Downtime::AddDowntime(GetCheckable(), GetAuthor(), GetComment(),
|
||||||
segment.first, segment.second,
|
segment.first, segment.second,
|
||||||
|
@ -261,4 +254,4 @@ void ScheduledDowntime::ValidateChildOptions(const Lazy<Value>& lvalue, const Va
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
BOOST_THROW_EXCEPTION(ValidationError(this, { "child_options" }, "Invalid child_options specified"));
|
BOOST_THROW_EXCEPTION(ValidationError(this, { "child_options" }, "Invalid child_options specified"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue