From: Milian Wolff Date: Tue, 10 May 2016 08:21:07 +0000 (+0200) Subject: Fix compile: include cmath and use std::round. X-Git-Tag: submit/tizen/20180620.112952^2~179 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c7a96012448123e70a60471d81dc2fb1f1f37605;p=sdk%2Ftools%2Fheaptrack.git Fix compile: include cmath and use std::round. --- diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 9107d51..71c5fe1 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -21,6 +21,8 @@ #include +#include + #include #include #include @@ -190,7 +192,7 @@ MainWindow::MainWindow(QWidget* parent) << i18n("
calls to allocation functions:
%1 (%2/s)
", data.cost.allocations, quint64(data.cost.allocations / totalTimeS)) << i18n("
temporary allocations:
%1 (%2%, %3/s)
", - data.cost.temporary, round(float(data.cost.temporary) * 100.f * 100.f / data.cost.allocations) / 100.f, + data.cost.temporary, std::round(float(data.cost.temporary) * 100.f * 100.f / data.cost.allocations) / 100.f, quint64(data.cost.temporary / totalTimeS)) << i18n("
bytes allocated in total (ignoring deallocations):
%1 (%2/s)
", format.formatByteSize(data.cost.allocated, 2), format.formatByteSize(data.cost.allocated / totalTimeS))