Skip to content

Commit

Permalink
Fix build with latest ndn-cxx
Browse files Browse the repository at this point in the history
Change-Id: I48f45eab3f3500c1a2174094c820642b1eb4962f
  • Loading branch information
Pesa committed Jan 26, 2024
1 parent a9d7db1 commit 11fc3eb
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions tests/clock-fixture.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Regents of the University of California,
* Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
Expand Down Expand Up @@ -28,8 +28,8 @@
namespace ndn::tests {

ClockFixture::ClockFixture()
: m_steadyClock(make_shared<time::UnitTestSteadyClock>())
, m_systemClock(make_shared<time::UnitTestSystemClock>())
: m_steadyClock(std::make_shared<time::UnitTestSteadyClock>())
, m_systemClock(std::make_shared<time::UnitTestSystemClock>())
{
time::setCustomClocks(m_steadyClock, m_systemClock);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/clock-fixture.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2022, Regents of the University of California,
* Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
Expand Down Expand Up @@ -78,8 +78,8 @@ class ClockFixture
}

protected:
shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
shared_ptr<time::UnitTestSystemClock> m_systemClock;
std::shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
std::shared_ptr<time::UnitTestSystemClock> m_systemClock;
};

} // namespace ndn::tests
Expand Down
4 changes: 2 additions & 2 deletions tests/ping/server/ping-server.t.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2023, Arizona Board of Regents.
* Copyright (c) 2014-2024, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -37,7 +37,7 @@ class PingServerFixture : public IoFixture, public KeyChainFixture
{
Name name(pingOptions.prefix);
name.append("ping")
.append(to_string(seq));
.append(std::to_string(seq));

return Interest(name)
.setMustBeFresh(true)
Expand Down
6 changes: 3 additions & 3 deletions tools/chunks/catchunks/data-fetcher.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2023, Regents of the University of California,
* Copyright (c) 2016-2024, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -138,7 +138,7 @@ DataFetcher::handleNack(const Interest& interest, const lp::Nack& nack,
else {
m_hasError = true;
if (m_onNack)
m_onNack(interest, "Reached the maximum number of nack retries (" + to_string(m_maxNackRetries) +
m_onNack(interest, "Reached the maximum number of nack retries (" + std::to_string(m_maxNackRetries) +
") while retrieving data for " + interest.getName().toUri());
}
}
Expand All @@ -163,7 +163,7 @@ DataFetcher::handleTimeout(const Interest& interest, const shared_ptr<DataFetche
else {
m_hasError = true;
if (m_onTimeout)
m_onTimeout(interest, "Reached the maximum number of timeout retries (" + to_string(m_maxTimeoutRetries) +
m_onTimeout(interest, "Reached the maximum number of timeout retries (" + std::to_string(m_maxTimeoutRetries) +
") while retrieving data for " + interest.getName().toUri());
}
}
Expand Down
6 changes: 3 additions & 3 deletions tools/chunks/catchunks/pipeline-interests-adaptive.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2023, Regents of the University of California,
* Copyright (c) 2016-2024, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -129,8 +129,8 @@ PipelineInterestsAdaptive::sendInterest(uint64_t segNo, bool isRetransmission)
if (m_options.maxRetriesOnTimeoutOrNack != DataFetcher::MAX_RETRIES_INFINITE &&
m_retxCount[segNo] > m_options.maxRetriesOnTimeoutOrNack) {
return handleFail(segNo, "Reached the maximum number of retries (" +
to_string(m_options.maxRetriesOnTimeoutOrNack) +
") while retrieving segment #" + to_string(segNo));
std::to_string(m_options.maxRetriesOnTimeoutOrNack) +
") while retrieving segment #" + std::to_string(segNo));
}

if (m_options.isVerbose) {
Expand Down
4 changes: 2 additions & 2 deletions tools/chunks/catchunks/pipeline-interests-fixed.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2022, Regents of the University of California,
* Copyright (c) 2016-2024, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -144,7 +144,7 @@ PipelineInterestsFixed::handleData(const Interest& interest, const Data& data, s
}
else if (fetcher.first->hasError()) { // fetcher.second <= m_lastSegmentNo
// there was an error while fetching a segment that is part of the content
return onFailure("Failure retrieving segment #" + to_string(fetcher.second));
return onFailure("Failure retrieving segment #" + std::to_string(fetcher.second));
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions tools/chunks/catchunks/pipeline-interests.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2016-2023, Regents of the University of California,
* Copyright (c) 2016-2024, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
Expand Down Expand Up @@ -115,7 +115,7 @@ PipelineInterests::printOptions() const
<< "\tInterest lifetime = " << m_options.interestLifetime << "\n"
<< "\tMax retries on timeout or Nack = " <<
(m_options.maxRetriesOnTimeoutOrNack == DataFetcher::MAX_RETRIES_INFINITE ?
"infinite" : to_string(m_options.maxRetriesOnTimeoutOrNack)) << "\n";
"infinite" : std::to_string(m_options.maxRetriesOnTimeoutOrNack)) << "\n";
}

void
Expand All @@ -142,15 +142,15 @@ PipelineInterests::formatThroughput(double throughput)
}
switch (pow) {
case 0:
return to_string(throughput) + " bit/s";
return std::to_string(throughput) + " bit/s";
case 1:
return to_string(throughput) + " kbit/s";
return std::to_string(throughput) + " kbit/s";
case 2:
return to_string(throughput) + " Mbit/s";
return std::to_string(throughput) + " Mbit/s";
case 3:
return to_string(throughput) + " Gbit/s";
return std::to_string(throughput) + " Gbit/s";
case 4:
return to_string(throughput) + " Tbit/s";
return std::to_string(throughput) + " Tbit/s";
}
return "";
}
Expand Down
4 changes: 2 additions & 2 deletions tools/dump/ndndump.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2011-2023, Regents of the University of California.
* Copyright (c) 2011-2024, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -130,7 +130,7 @@ NdnDump::run()
m_dataLinkType = pcap_datalink(m_pcap);
const char* dltName = pcap_datalink_val_to_name(m_dataLinkType);
const char* dltDesc = pcap_datalink_val_to_description(m_dataLinkType);
std::string formattedDlt = dltName ? dltName : to_string(m_dataLinkType);
std::string formattedDlt = dltName ? dltName : std::to_string(m_dataLinkType);
if (dltDesc) {
formattedDlt += " ("s + dltDesc + ")";
}
Expand Down
4 changes: 2 additions & 2 deletions tools/ping/client/ping.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014-2023, Arizona Board of Regents.
* Copyright (c) 2014-2024, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
Expand Down Expand Up @@ -117,7 +117,7 @@ Ping::makePingName(uint64_t seq) const
if (!m_options.clientIdentifier.empty()) {
name.append(m_options.clientIdentifier);
}
name.append(to_string(seq));
name.append(std::to_string(seq));
return name;
}

Expand Down

0 comments on commit 11fc3eb

Please sign in to comment.