Add missing include
Fixes compilation with gcc 10
Change-Id: I54f0808c7519b8bf1a668f05c4d09d4ca3d3b11f
diff --git a/src/statistics.cpp b/src/statistics.cpp
index f5f5516..2eb6cbe 100644
--- a/src/statistics.cpp
+++ b/src/statistics.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017, The University of Memphis,
+/*
+ * Copyright (c) 2014-2020, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -28,13 +28,11 @@
size_t
Statistics::get(PacketType type) const
{
- std::map<PacketType,int>::const_iterator it = m_packetCounter.find(type);
- if(it != m_packetCounter.end())
- {
+ auto it = m_packetCounter.find(type);
+ if (it != m_packetCounter.end()) {
return it->second;
}
- else
- {
+ else {
return 0;
}
}
@@ -48,8 +46,7 @@
void
Statistics::resetAll()
{
- for (auto&& it : m_packetCounter )
- {
+ for (auto& it : m_packetCounter) {
it.second = 0;
}
}