Skip to content

Commit

Permalink
Merge b9f39bf into 7d90e33
Browse files Browse the repository at this point in the history
  • Loading branch information
MFraters authored Sep 12, 2018
2 parents 7d90e33 + b9f39bf commit 384ebb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/world_builder/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ namespace WorldBuilder
/**
* Converts a string to a int
*/
double
int
string_to_int(const std::string &string);


/**
* Converts a string to a unsigned int
*/
double
unsigned int
string_to_unsigned_int(const std::string &string);

/**
Expand Down
8 changes: 4 additions & 4 deletions source/utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ namespace WorldBuilder
return d;
}

double
int
string_to_int(const std::string &string)
{
// trim whitespace on either side of the text if necessary
Expand All @@ -394,7 +394,7 @@ namespace WorldBuilder
while ((s.size() > 0) && (s[s.size() - 1] == ' '))
s.erase(s.end() - 1);

double d = 0;
int d = 0;
try
{
d = boost::lexical_cast<int>(s);
Expand All @@ -408,7 +408,7 @@ namespace WorldBuilder
}


double
unsigned int
string_to_unsigned_int(const std::string &string)
{
// trim whitespace on either side of the text if necessary
Expand All @@ -418,7 +418,7 @@ namespace WorldBuilder
while ((s.size() > 0) && (s[s.size() - 1] == ' '))
s.erase(s.end() - 1);

double d = 0;
unsigned int d = 0;
try
{
d = boost::lexical_cast<unsigned int>(s);
Expand Down

0 comments on commit 384ebb0

Please sign in to comment.