daemon+tests: avoid deprecated ndn-cxx functions
Change-Id: Idfa341629919d63fac140eda0b465f8f8abd38e6
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index 33ae643..2d118ec 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -83,7 +83,7 @@
NFD_LOG_FACE_TRACE(__func__);
websocketpp::lib::error_code error;
- m_server.send(m_handle, packet.wire(), packet.size(),
+ m_server.send(m_handle, packet.data(), packet.size(),
websocketpp::frame::opcode::binary, error);
if (error)
return processErrorCode(error);
diff --git a/daemon/table/dead-nonce-list.cpp b/daemon/table/dead-nonce-list.cpp
index 5805842..55bf346 100644
--- a/daemon/table/dead-nonce-list.cpp
+++ b/daemon/table/dead-nonce-list.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -109,7 +109,7 @@
const auto& nameWire = name.wireEncode();
uint32_t n;
std::memcpy(&n, nonce.data(), sizeof(n));
- return CityHash64WithSeed(reinterpret_cast<const char*>(nameWire.wire()), nameWire.size(), n);
+ return CityHash64WithSeed(reinterpret_cast<const char*>(nameWire.data()), nameWire.size(), n);
}
size_t
diff --git a/daemon/table/name-tree-hashtable.cpp b/daemon/table/name-tree-hashtable.cpp
index 7d20a34..30e4ca3 100644
--- a/daemon/table/name-tree-hashtable.cpp
+++ b/daemon/table/name-tree-hashtable.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2019, Regents of the University of California,
+ * Copyright (c) 2014-2022, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -64,7 +64,7 @@
HashValue h = 0;
for (size_t i = 0, last = std::min(prefixLen, name.size()); i < last; ++i) {
const name::Component& comp = name[i];
- h ^= HashFunc::compute(comp.wire(), comp.size());
+ h ^= HashFunc::compute(comp.data(), comp.size());
}
return h;
}
@@ -83,7 +83,7 @@
for (size_t i = 0; i < last; ++i) {
const name::Component& comp = name[i];
- h ^= HashFunc::compute(comp.wire(), comp.size());
+ h ^= HashFunc::compute(comp.data(), comp.size());
seq.push_back(h);
}
return seq;