core: slim down `common.hpp`
Change-Id: I875c35147edd2261fbaa24e809c170d5cd9b94d3
diff --git a/tools/ndn-autoconfig/dns-srv.cpp b/tools/ndn-autoconfig/dns-srv.cpp
index bc0b3a6..ee1970e 100644
--- a/tools/ndn-autoconfig/dns-srv.cpp
+++ b/tools/ndn-autoconfig/dns-srv.cpp
@@ -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,
@@ -110,7 +110,7 @@
NDN_THROW(DnsSrvError("SRV record cannot be parsed (error decoding host name)"));
}
- return "udp://"s + hostName + ":" + to_string(port);
+ return "udp://"s + hostName + ":" + std::to_string(port);
}
std::string
diff --git a/tools/ndn-autoconfig/multicast-discovery.cpp b/tools/ndn-autoconfig/multicast-discovery.cpp
index 61312cd..dca08fc 100644
--- a/tools/ndn-autoconfig/multicast-discovery.cpp
+++ b/tools/ndn-autoconfig/multicast-discovery.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, 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,
@@ -55,7 +55,7 @@
filter,
[this] (const auto& dataset) { registerHubDiscoveryPrefix(dataset); },
[this] (uint32_t code, const std::string& reason) {
- fail("Error " + to_string(code) + " when querying multi-access faces: " + reason);
+ fail("Error " + std::to_string(code) + " when querying multi-access faces: " + reason);
});
}
@@ -119,7 +119,7 @@
parameters,
[this] (const auto&) { requestHubData(); },
[this] (const auto& resp) {
- fail("Error " + to_string(resp.getCode()) + " when setting multicast strategy: " + resp.getText());
+ fail("Error " + std::to_string(resp.getCode()) + " when setting multicast strategy: " + resp.getText());
});
}
diff --git a/tools/ndn-autoconfig/ndn-fch-discovery.cpp b/tools/ndn-autoconfig/ndn-fch-discovery.cpp
index 0e5c6b0..51234fc 100644
--- a/tools/ndn-autoconfig/ndn-fch-discovery.cpp
+++ b/tools/ndn-autoconfig/ndn-fch-discovery.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, 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,
@@ -181,7 +181,7 @@
}
if (statusCode != 200) {
boost::trim(statusMessage);
- NDN_THROW(HttpException("HTTP request failed: " + to_string(statusCode) + " " + statusMessage));
+ NDN_THROW(HttpException("HTTP request failed: " + std::to_string(statusCode) + " " + statusMessage));
}
std::string header;
while (std::getline(requestStream, header) && header != "\r")