Skip to content

Commit b887790

Browse files
committed
move stuff into details namespace
1 parent b5b3e3f commit b887790

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

include/scl/hex.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <sstream>
2323
#include <string>
2424

25-
namespace scl {
25+
namespace scl::details {
2626

2727
/**
2828
* @brief Convert value into a string.
@@ -56,8 +56,6 @@ std::string toHexString(It begin, It end) {
5656
template <>
5757
std::string toHexString(const __uint128_t& v);
5858

59-
namespace details {
60-
6159
#define SCL_TO_HEX(v, c) \
6260
do { \
6361
if ((c) >= '0' && (c) <= '9') \
@@ -97,7 +95,6 @@ T fromHexString(const std::string& s) {
9795

9896
#undef SCL_TO_HEX
9997

100-
} // namespace details
101-
} // namespace scl
98+
} // namespace scl::details
10299

103100
#endif // SCL_HEX_H

include/scl/math/z2k.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class Z2k final {
310310
*/
311311
std::string toString() const {
312312
const auto w = m_value & MASK;
313-
return toHexString(w);
313+
return details::toHexString(w);
314314
}
315315

316316
/**

include/scl/primitives/digest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ using Digest = std::array<unsigned char, BITS / 8>;
4242
*/
4343
template <typename DIGEST>
4444
std::string digestToString(const DIGEST& digest) {
45-
return toHexString(digest.begin(), digest.end());
45+
return details::toHexString(digest.begin(), digest.end());
4646
}
4747

4848
} // namespace scl

src/scl/hex.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <cstdint>
2121

2222
template <>
23-
std::string scl::toHexString(const __uint128_t& v) {
23+
std::string scl::details::toHexString(const __uint128_t& v) {
2424
std::string str;
2525
if (v == 0) {
2626
str = "0";

0 commit comments

Comments
 (0)