From 3edead271655316826864ebb8a0d9d529402f31f Mon Sep 17 00:00:00 2001 From: Nicholas Corgan Date: Mon, 27 Jan 2014 11:14:54 -0800 Subject: Brought in UHD 3.6.2 MacPorts patches for OS X compatibility * With OS X, boost::lexical_cast won't accept to_hex as a type --- host/utils/b2xx_fx3_utils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'host/utils') diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp index 96cd1f3e7..d5f829c80 100644 --- a/host/utils/b2xx_fx3_utils.cpp +++ b/host/utils/b2xx_fx3_utils.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2013 Ettus Research LLC +// Copyright 2010-2014 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -79,7 +79,10 @@ template struct to_hex{ //!parse hex-formatted ASCII text into an int boost::uint16_t atoh(const std::string &string){ if (string.substr(0, 2) == "0x"){ - return boost::lexical_cast >(string); + std::stringstream interpreter(string); + to_hex hh; + interpreter >> hh; + return hh.value; } return boost::lexical_cast(string); } -- cgit v1.2.3