Skip to content

Commit

Permalink
Cast double to float (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz authored and scpeters committed Nov 15, 2018
1 parent a0a4c92 commit 5762580
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion urdf_model/include/urdf_model/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Color
double piece = strToDouble(pieces[i].c_str());
if ((piece < 0) || (piece > 1))
throw ParseError("Component [" + pieces[i] + "] is outside the valid range for colors [0, 1]");
rgba.push_back(piece);
rgba.push_back(static_cast<float>(piece));
}
catch (std::runtime_error &/*e*/) {
throw ParseError("Unable to parse component [" + pieces[i] + "] to a double (while parsing a color value)");
Expand Down

0 comments on commit 5762580

Please sign in to comment.