From 98a4cb27b2a22bd14673241aea316c623eaa89cc Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 16 Dec 2015 12:34:09 +0100 Subject: [PATCH] decorator_stress: explicitly generate long values Explicitly cast floats to long as we currently do not plan to support float in Xml_generator and previously the value was implicitly casted to long anyway. Issue #1819 --- repos/gems/src/test/decorator_stress/main.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repos/gems/src/test/decorator_stress/main.cc b/repos/gems/src/test/decorator_stress/main.cc index 07d2eae6c..4583eb495 100644 --- a/repos/gems/src/test/decorator_stress/main.cc +++ b/repos/gems/src/test/decorator_stress/main.cc @@ -57,10 +57,10 @@ void report_window_layout(Param param, Genode::Reporter &reporter) xml.node("window", [&] () { xml.attribute("id", i); - xml.attribute("xpos", w * (0.25 + sin(param.angle[0])/5)); - xml.attribute("ypos", h * (0.25 + sin(param.angle[1])/5)); - xml.attribute("width", w * (0.25 + sin(param.angle[2])/5)); - xml.attribute("height", h * (0.25 + sin(param.angle[3])/5)); + xml.attribute("xpos", (long)(w * (0.25 + sin(param.angle[0])/5))); + xml.attribute("ypos", (long)(h * (0.25 + sin(param.angle[1])/5))); + xml.attribute("width", (long)(w * (0.25 + sin(param.angle[2])/5))); + xml.attribute("height", (long)(h * (0.25 + sin(param.angle[3])/5))); if (i == 2) xml.attribute("focused", "yes");