aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/utils/byteswap.ipp12
-rw-r--r--host/include/uhd/utils/math.hpp4
2 files changed, 10 insertions, 6 deletions
diff --git a/host/include/uhd/utils/byteswap.ipp b/host/include/uhd/utils/byteswap.ipp
index 5b2a7252f..f6c9407b6 100644
--- a/host/include/uhd/utils/byteswap.ipp
+++ b/host/include/uhd/utils/byteswap.ipp
@@ -101,7 +101,9 @@
**********************************************************************/
#include <boost/detail/endian.hpp>
-template<typename T> UHD_INLINE T uhd::ntohx(T num){
+namespace uhd {
+
+template<typename T> UHD_INLINE T ntohx(T num){
#ifdef BOOST_BIG_ENDIAN
return num;
#else
@@ -109,7 +111,7 @@ template<typename T> UHD_INLINE T uhd::ntohx(T num){
#endif
}
-template<typename T> UHD_INLINE T uhd::htonx(T num){
+template<typename T> UHD_INLINE T htonx(T num){
#ifdef BOOST_BIG_ENDIAN
return num;
#else
@@ -117,7 +119,7 @@ template<typename T> UHD_INLINE T uhd::htonx(T num){
#endif
}
-template<typename T> UHD_INLINE T uhd::wtohx(T num){
+template<typename T> UHD_INLINE T wtohx(T num){
#ifdef BOOST_BIG_ENDIAN
return uhd::byteswap(num);
#else
@@ -125,7 +127,7 @@ template<typename T> UHD_INLINE T uhd::wtohx(T num){
#endif
}
-template<typename T> UHD_INLINE T uhd::htowx(T num){
+template<typename T> UHD_INLINE T htowx(T num){
#ifdef BOOST_BIG_ENDIAN
return uhd::byteswap(num);
#else
@@ -133,4 +135,6 @@ template<typename T> UHD_INLINE T uhd::htowx(T num){
#endif
}
+} /* namespace uhd */
+
#endif /* INCLUDED_UHD_UTILS_BYTESWAP_IPP */
diff --git a/host/include/uhd/utils/math.hpp b/host/include/uhd/utils/math.hpp
index ef7bfb6b7..088983167 100644
--- a/host/include/uhd/utils/math.hpp
+++ b/host/include/uhd/utils/math.hpp
@@ -34,8 +34,8 @@ namespace math {
/*!
* Numeric limits of certain types.
*
- * There are many sources for getting these, including std::numeric_limts,
- * <cstdint>, <climits>, and Boost. The <cstdint> option is preferable as it
+ * There are many sources for getting these, including std::numeric_limits,
+ * `<cstdint>`, `<climits>`, and Boost. The `<cstdint>` option is preferable as it
* gives us fixed-width constants, but unfortunately is new as of C++11.
* Since this isn't available on many systems, we need to use one of the
* other options. We will use the Boost option, here, since we use Boost