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
This commit is contained in:
Christian Helmuth 2015-12-16 12:34:09 +01:00
parent 971b531d58
commit 98a4cb27b2
1 changed files with 4 additions and 4 deletions

View File

@ -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");