bug 245: build failure with gcc 4.3.x
This commit is contained in:
@@ -536,6 +536,7 @@ private:
|
||||
#ifdef BUFFER_USE_INLINE
|
||||
|
||||
#include "ns3/assert.h"
|
||||
#include <string.h>
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
|
||||
@@ -29,7 +29,10 @@ DoParse (const std::string s, uint64_t *v)
|
||||
std::string::size_type n = s.find_first_not_of("0123456789.");
|
||||
if (n != std::string::npos)
|
||||
{ // Found non-numeric
|
||||
double r = ::atof(s.substr(0, n).c_str());
|
||||
std::istringstream iss;
|
||||
iss.str (s.substr(0, n));
|
||||
double r;
|
||||
iss >> r;
|
||||
std::string trailer = s.substr(n, std::string::npos);
|
||||
if (trailer == "bps")
|
||||
{
|
||||
@@ -117,7 +120,9 @@ DoParse (const std::string s, uint64_t *v)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
*v = ::atoll(s.c_str());
|
||||
std::istringstream iss;
|
||||
iss.str (s);
|
||||
iss >> *v;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "tag-list.h"
|
||||
#include "ns3/log.h"
|
||||
#include <vector>
|
||||
#include <string.h>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("TagList");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user