Improve and simplify code with modern C++ features
Change-Id: I83bf5513c2a1f90ba5a59e93c473306864b27d94
diff --git a/tests/daemon/face/lp-reassembler.t.cpp b/tests/daemon/face/lp-reassembler.t.cpp
index 9cfa8dd..b1140d8 100644
--- a/tests/daemon/face/lp-reassembler.t.cpp
+++ b/tests/daemon/face/lp-reassembler.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -40,13 +40,13 @@
{
reassembler.beforeTimeout.connect(
[this] (Transport::EndpointId remoteEp, size_t nDroppedFragments) {
- timeoutHistory.push_back(std::make_tuple(remoteEp, nDroppedFragments));
+ timeoutHistory.push_back({remoteEp, nDroppedFragments});
});
}
protected:
- LpReassembler reassembler;
- std::vector<std::tuple<Transport::EndpointId, size_t>> timeoutHistory;
+ LpReassembler reassembler{{}};
+ std::vector<std::pair<Transport::EndpointId, size_t>> timeoutHistory;
static const uint8_t data[10];
};