Skip to content

Commit

Permalink
Drop TimePeriod#Merge()
Browse files Browse the repository at this point in the history
refs #7398
  • Loading branch information
Al2Klimov authored and yhabteab committed Jun 21, 2022
1 parent 769de8d commit cef46e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
17 changes: 0 additions & 17 deletions lib/icinga/timeperiod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,23 +201,6 @@ void TimePeriod::PurgeSegments(double end)
SetSegments(newSegments);
}

void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include)
{
Log(LogDebug, "TimePeriod")
<< "Merge TimePeriod '" << GetName() << "' with '" << timeperiod->GetName() << "' "
<< "Method: " << (include ? "include" : "exclude");

Array::Ptr segments = timeperiod->GetSegments();

if (segments) {
ObjectLock dlock(segments);
ObjectLock ilock(this);
for (const Dictionary::Ptr& segment : segments) {
include ? AddSegment(segment) : RemoveSegment(segment);
}
}
}

void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
{
if (clearExisting) {
Expand Down
2 changes: 0 additions & 2 deletions lib/icinga/timeperiod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class TimePeriod final : public ObjectImpl<TimePeriod>
void RemoveSegment(const Dictionary::Ptr& segment);
void PurgeSegments(double end);

void Merge(const TimePeriod::Ptr& timeperiod, bool include = true);

void Dump();

static void UpdateTimerHandler();
Expand Down

0 comments on commit cef46e5

Please sign in to comment.