The unified diff between revisions [fd68181d..] and [749fac9e..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'checks/bench.cpp'
#
#
# patch "checks/bench.cpp"
# from [380f38c3230ff1cc3599246b0c9152d77994f7a6]
# to [c6edf6ea5b86de31a9297b8c4a38e20b00b17569]
#
============================================================
--- checks/bench.cpp 380f38c3230ff1cc3599246b0c9152d77994f7a6
+++ checks/bench.cpp c6edf6ea5b86de31a9297b8c4a38e20b00b17569
@@ -35,7 +35,7 @@ double bench_filter(std::string name, Bo
u32bit iterations = 0;
u64bit start = get_clock(), clocks_used = 0;
- u64bit go_up_to = (u64bit)(seconds * get_ticks());
+ u64bit go_up_to = static_cast<u64bit>(seconds * get_ticks());
while(clocks_used < go_up_to)
{
@@ -44,8 +44,8 @@ double bench_filter(std::string name, Bo
clocks_used = get_clock() - start;
}
- double bytes_per_sec = ((double)iterations * BUFFERSIZE) /
- ((double)clocks_used / get_ticks());
+ double bytes_per_sec = (static_cast<double>(iterations) * BUFFERSIZE) /
+ (static_cast<double>(clocks_used) / get_ticks());
double mbytes_per_sec = bytes_per_sec / (1024.0 * 1024.0);
std::cout.setf(std::ios::fixed, std::ios::floatfield);
@@ -121,7 +121,7 @@ void benchmark(const std::string& what,
if(html)
std::cout << "</TABLE>\n\n";
- double average = std::exp(sum / (double)how_many);
+ double average = std::exp(sum / static_cast<double>(how_many));
if(what == "All" && html)
std::cout << "\n<P>Overall speed average: " << average