X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/bd2c5ebb465f2265d618feefb66479e5259dcfaa..9075115540d133ca048025e719884121007b9e87:/Client/src/principal.cpp diff --git a/Client/src/principal.cpp b/Client/src/principal.cpp index f9cb07f..c73f2c8 100644 --- a/Client/src/principal.cpp +++ b/Client/src/principal.cpp @@ -799,7 +799,7 @@ void Principal::read_status_xml(const std::string &frame) Gdk::Color Principal::get_rgb_from_xml(xmlNodePtr nodo) { - unsigned r,g,b; + gushort r,g,b; while (nodo != NULL) { if (nodo->type == XML_ELEMENT_NODE) { if (xmlStrcmp(nodo->name, BAD_CAST"r")==0) @@ -811,14 +811,15 @@ Gdk::Color Principal::get_rgb_from_xml(xmlNodePtr nodo) } nodo = nodo->next; } - r = 65535 * r / 255; - g = 65535 * g / 255; - b = 65535 * b / 255; + r = static_cast(65535 * (r / 255.0f)); + g = static_cast(65535 * (g / 255.0f)); + b = static_cast(65535 * (b / 255.0f)); Gdk::Color c; c.set_rgb(r,g,b); return c; } + float Principal::get_float_from_xml(xmlNodePtr nodo) { float tmp = -1; @@ -846,7 +847,6 @@ bool Principal::get_bool_from_xml(xmlNodePtr nodo) } nodo = nodo->next; } - std::cout << "AAACCCCAA : " << tmp << std::endl; return tmp == "true"; }