MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetAndClear

Method GetAndClear

test/icinga-checkresult.cpp:832–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830
831 struct NotificationLog {
832 std::vector<std::pair<NotificationType, ServiceState>> GetAndClear() {
833 std::lock_guard<std::mutex> lock (mutex);
834
835 std::vector<std::pair<NotificationType, ServiceState>> ret;
836 std::swap(ret, log);
837 return ret;
838 }
839
840 void Add(std::pair<NotificationType, ServiceState> notification) {
841 std::lock_guard<std::mutex> lock (mutex);

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 1

swapFunction · 0.85

Tested by

no test coverage detected