mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 01:08:04 +02:00
Avoid copying local variables if possible
This commit is contained in:
parent
4d46d73f41
commit
08cca705a8
@ -171,7 +171,7 @@ std::pair<double, double> ScheduledDowntime::FindRunningSegment(double minEnd)
|
||||
|
||||
if (!bestSegment || end > bestEnd) {
|
||||
Log(LogDebug, "ScheduledDowntime") << "(best match yet)";
|
||||
bestSegment = segment;
|
||||
bestSegment = std::move(segment);
|
||||
bestBegin = begin;
|
||||
bestEnd = end;
|
||||
}
|
||||
@ -227,7 +227,7 @@ std::pair<double, double> ScheduledDowntime::FindNextSegment()
|
||||
|
||||
if (!bestSegment || begin < bestBegin) {
|
||||
Log(LogDebug, "ScheduledDowntime") << "(best match yet)";
|
||||
bestSegment = segment;
|
||||
bestSegment = std::move(segment);
|
||||
bestBegin = begin;
|
||||
bestEnd = end;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ void HttpHandler::Register(const Url::Ptr& url, const HttpHandler::Ptr& handler)
|
||||
children->Set(elem, sub_node);
|
||||
}
|
||||
|
||||
node = sub_node;
|
||||
node = std::move(sub_node);
|
||||
}
|
||||
|
||||
Array::Ptr handlers = node->Get("handlers");
|
||||
|
Loading…
x
Reference in New Issue
Block a user