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_clock/octoclock/octoclock_eeprom.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp') diff --git a/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp b/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp index b39bc4b52..b0d24deec 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp @@ -41,13 +41,13 @@ using namespace uhd::transport; * Implementation **********************************************************************/ void octoclock_eeprom_t::_load(){ - boost::uint8_t octoclock_data[udp_simple::mtu]; + uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast(octoclock_data); const octoclock_fw_eeprom_t *eeprom_in = reinterpret_cast(pkt_in->data); octoclock_packet_t pkt_out; // To avoid replicating sequence numbers between sessions - pkt_out.sequence = boost::uint32_t(std::rand()); + pkt_out.sequence = uint32_t(std::rand()); size_t len = 0; UHD_OCTOCLOCK_SEND_AND_RECV(xport, _proto_ver, SEND_EEPROM_CMD, pkt_out, len, octoclock_data); @@ -57,19 +57,19 @@ void octoclock_eeprom_t::_load(){ (*this)["mac-addr"] = mac_addr_t::from_bytes(mac_bytes).to_string(); //IP address - boost::uint32_t ip_addr = uhd::htonx(eeprom_in->ip_addr); + uint32_t ip_addr = uhd::htonx(eeprom_in->ip_addr); ip_v4::bytes_type ip_addr_bytes; memcpy(&ip_addr_bytes, &ip_addr, 4); (*this)["ip-addr"] = ip_v4(ip_addr_bytes).to_string(); //Default router - boost::uint32_t dr_addr = uhd::htonx(eeprom_in->dr_addr); + uint32_t dr_addr = uhd::htonx(eeprom_in->dr_addr); ip_v4::bytes_type dr_addr_bytes; memcpy(&dr_addr_bytes, &dr_addr, 4); (*this)["gateway"] = ip_v4(dr_addr_bytes).to_string(); //Netmask - boost::uint32_t netmask = uhd::htonx(eeprom_in->netmask); + uint32_t netmask = uhd::htonx(eeprom_in->netmask); ip_v4::bytes_type netmask_bytes; memcpy(&netmask_bytes, &netmask, 4); (*this)["netmask"] = ip_v4(netmask_bytes).to_string(); @@ -91,12 +91,12 @@ void octoclock_eeprom_t::_load(){ } void octoclock_eeprom_t::_store() const { - boost::uint8_t octoclock_data[udp_simple::mtu]; + uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast(octoclock_data); octoclock_packet_t pkt_out; // To avoid replicating sequence numbers between sessions - pkt_out.sequence = boost::uint32_t(std::rand()); + pkt_out.sequence = uint32_t(std::rand()); pkt_out.len = sizeof(octoclock_fw_eeprom_t); size_t len = 0; @@ -112,21 +112,21 @@ void octoclock_eeprom_t::_store() const { if((*this).has_key("ip-addr")){ ip_v4::bytes_type ip_addr_bytes = ip_v4::from_string((*this)["ip-addr"]).to_bytes(); memcpy(&eeprom_out->ip_addr, &ip_addr_bytes, 4); - eeprom_out->ip_addr = uhd::htonx(eeprom_out->ip_addr); + eeprom_out->ip_addr = uhd::htonx(eeprom_out->ip_addr); } //Default router if((*this).has_key("gateway")){ ip_v4::bytes_type dr_addr_bytes = ip_v4::from_string((*this)["gateway"]).to_bytes(); memcpy(&eeprom_out->dr_addr, &dr_addr_bytes, 4); - eeprom_out->dr_addr = uhd::htonx(eeprom_out->dr_addr); + eeprom_out->dr_addr = uhd::htonx(eeprom_out->dr_addr); } //Netmask if((*this).has_key("netmask")){ ip_v4::bytes_type netmask_bytes = ip_v4::from_string((*this)["netmask"]).to_bytes(); memcpy(&eeprom_out->netmask, &netmask_bytes, 4); - eeprom_out->netmask = uhd::htonx(eeprom_out->netmask); + eeprom_out->netmask = uhd::htonx(eeprom_out->netmask); } //Serial -- cgit v1.2.3