From 99c2730bc9db270560671f2d7d173768465ed51f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 31 Oct 2016 14:30:52 -0700 Subject: Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types) - Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be , but not all of our compilers support that). --- host/lib/usrp/e300/e300_eeprom_manager.cpp | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'host/lib/usrp/e300/e300_eeprom_manager.cpp') diff --git a/host/lib/usrp/e300/e300_eeprom_manager.cpp b/host/lib/usrp/e300/e300_eeprom_manager.cpp index 00200747d..d43ca3d4c 100644 --- a/host/lib/usrp/e300/e300_eeprom_manager.cpp +++ b/host/lib/usrp/e300/e300_eeprom_manager.cpp @@ -21,7 +21,7 @@ namespace uhd { namespace usrp { namespace e300 { -static const std::string _bytes_to_string(const boost::uint8_t* bytes, size_t max_len) +static const std::string _bytes_to_string(const uint8_t* bytes, size_t max_len) { std::string out; for (size_t i = 0; i < max_len; i++) { @@ -31,7 +31,7 @@ static const std::string _bytes_to_string(const boost::uint8_t* bytes, size_t ma return out; } -static void _string_to_bytes(const std::string &string, size_t max_len, boost::uint8_t* buffer) +static void _string_to_bytes(const std::string &string, size_t max_len, uint8_t* buffer) { byte_vector_t bytes; const size_t len = std::min(string.size(), max_len); @@ -56,7 +56,7 @@ const mboard_eeprom_t& e300_eeprom_manager::read_mb_eeprom(void) { boost::mutex::scoped_lock(_mutex); - std::vector bytes; + std::vector bytes; bytes.resize(sizeof(mb_eeprom_map_t)); mb_eeprom_map_t *map_ptr = reinterpret_cast(&bytes[0]); memset(map_ptr, 0xff, sizeof(mb_eeprom_map_t)); @@ -68,9 +68,9 @@ const mboard_eeprom_t& e300_eeprom_manager::read_mb_eeprom(void) mb_eeprom_map_t &map = *map_ptr; _mb_eeprom["product"] = boost::lexical_cast( - uhd::ntohx(map.hw_product)); + uhd::ntohx(map.hw_product)); _mb_eeprom["revision"] = boost::lexical_cast( - uhd::ntohx(map.hw_revision)); + uhd::ntohx(map.hw_revision)); _mb_eeprom["serial"] = _bytes_to_string( map.serial, MB_SERIAL_LEN); @@ -87,7 +87,7 @@ const dboard_eeprom_t& e300_eeprom_manager::read_db_eeprom(void) { boost::mutex::scoped_lock(_mutex); - std::vector bytes; + std::vector bytes; bytes.resize(sizeof(db_eeprom_map_t)); db_eeprom_map_t *map_ptr = reinterpret_cast(&bytes[0]); memset(map_ptr, 0xff, sizeof(db_eeprom_map_t)); @@ -99,10 +99,10 @@ const dboard_eeprom_t& e300_eeprom_manager::read_db_eeprom(void) db_eeprom_map_t &map = *map_ptr; _db_eeprom.id = uhd::usrp::dboard_id_t::from_uint16( - uhd::ntohx(map.hw_product)); + uhd::ntohx(map.hw_product)); _db_eeprom.revision = boost::lexical_cast( - uhd::ntohx(map.hw_revision)); + uhd::ntohx(map.hw_revision)); _db_eeprom.serial = _bytes_to_string( map.serial, DB_SERIAL_LEN); @@ -113,7 +113,7 @@ void e300_eeprom_manager::write_db_eeprom(const dboard_eeprom_t& eeprom) { boost::mutex::scoped_lock(_mutex); _db_eeprom = eeprom; - std::vector bytes; + std::vector bytes; bytes.resize(sizeof(db_eeprom_map_t)); @@ -131,13 +131,13 @@ void e300_eeprom_manager::write_db_eeprom(const dboard_eeprom_t& eeprom) map.data_version_minor = E310_DB_MAP_MINOR; if (_db_eeprom.id != dboard_id_t::none()) { - map.hw_product = uhd::htonx( + map.hw_product = uhd::htonx( _db_eeprom.id.to_uint16()); } if (not _db_eeprom.revision.empty()) { - map.hw_revision = uhd::htonx( - boost::lexical_cast(_db_eeprom.revision)); + map.hw_revision = uhd::htonx( + boost::lexical_cast(_db_eeprom.revision)); } if (not _db_eeprom.serial.empty()) { @@ -151,7 +151,7 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom) { boost::mutex::scoped_lock(_mutex); _mb_eeprom = eeprom; - std::vector bytes; + std::vector bytes; bytes.resize(sizeof(mb_eeprom_map_t)); @@ -170,12 +170,12 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom) if (_mb_eeprom.has_key("product")) { - map.hw_product = uhd::htonx( - boost::lexical_cast(_mb_eeprom["product"])); + map.hw_product = uhd::htonx( + boost::lexical_cast(_mb_eeprom["product"])); } if (_mb_eeprom.has_key("revision")) { - map.hw_revision = uhd::htonx( - boost::lexical_cast(_mb_eeprom["revision"])); + map.hw_revision = uhd::htonx( + boost::lexical_cast(_mb_eeprom["revision"])); } if (_mb_eeprom.has_key("serial")) { _string_to_bytes(_mb_eeprom["serial"], MB_SERIAL_LEN, map.serial); @@ -198,13 +198,13 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom) e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(void) const { boost::mutex::scoped_lock(_mutex); - boost::uint16_t pid = boost::lexical_cast( + uint16_t pid = boost::lexical_cast( _mb_eeprom["product"]); return get_mb_type(pid); } e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type( - boost::uint16_t pid) + uint16_t pid) { switch (pid) { case E300_MB_PID: @@ -225,7 +225,7 @@ e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type( std::string e300_eeprom_manager::get_mb_type_string(void) const { boost::mutex::scoped_lock(_mutex); - boost::uint16_t product = boost::lexical_cast( + uint16_t product = boost::lexical_cast( _mb_eeprom["product"]); switch (product) { case E300_MB_PID: -- cgit v1.2.3