diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-06-18 12:59:55 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-06-18 17:43:49 -0700 |
commit | 4082c7489b4adf28b93312e758063eb7960c890b (patch) | |
tree | 5a0c9be8043becd125476c34a06c3e607e1467c7 /host | |
parent | 16a3490e1bb71f18ca75afa80845100327ecb734 (diff) | |
download | uhd-4082c7489b4adf28b93312e758063eb7960c890b.tar.gz uhd-4082c7489b4adf28b93312e758063eb7960c890b.tar.bz2 uhd-4082c7489b4adf28b93312e758063eb7960c890b.zip |
byte_vector: removed duplicate code
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/types/byte_vector.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/host/lib/types/byte_vector.cpp b/host/lib/types/byte_vector.cpp index 36b311faf..071cdb8cb 100644 --- a/host/lib/types/byte_vector.cpp +++ b/host/lib/types/byte_vector.cpp @@ -16,7 +16,6 @@ // #include <boost/foreach.hpp> -#include <boost/lexical_cast.hpp> #include <uhd/types/byte_vector.hpp> @@ -31,11 +30,6 @@ std::string bytes_to_string(const byte_vector_t &bytes){ return out; } -std::string uint16_bytes_to_string(const byte_vector_t &bytes){ - const boost::uint16_t num = (boost::uint16_t(bytes.at(0)) << 0) | (boost::uint16_t(bytes.at(1)) << 8); - return (num == 0 or num == 0xffff)? "" : boost::lexical_cast<std::string>(num); -} - byte_vector_t string_to_bytes(const std::string &str, size_t max_length){ byte_vector_t bytes; for (size_t i = 0; i < std::min(str.size(), max_length); i++){ @@ -45,11 +39,4 @@ byte_vector_t string_to_bytes(const std::string &str, size_t max_length){ return bytes; } -byte_vector_t string_to_uint16_bytes(const std::string &num_str){ - const boost::uint16_t num = boost::lexical_cast<boost::uint16_t>(num_str); - const byte_vector_t lsb_msb = boost::assign::list_of - (boost::uint8_t(num >> 0))(boost::uint8_t(num >> 8)); - return lsb_msb; -} - } /* namespace uhd */ |