From 576258050dbe6332b12c7190da5e5b1032ed7185 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Thu, 15 Nov 2018 13:51:42 -0800 Subject: [PATCH] Cast double to float (#48) --- urdf_model/include/urdf_model/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urdf_model/include/urdf_model/color.h b/urdf_model/include/urdf_model/color.h index fec8ae0..06264c1 100644 --- a/urdf_model/include/urdf_model/color.h +++ b/urdf_model/include/urdf_model/color.h @@ -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(piece)); } catch (std::runtime_error &/*e*/) { throw ParseError("Unable to parse component [" + pieces[i] + "] to a double (while parsing a color value)");