diff options
Diffstat (limited to 'common/rfb/DecodeManager.cxx')
-rw-r--r-- | common/rfb/DecodeManager.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/common/rfb/DecodeManager.cxx b/common/rfb/DecodeManager.cxx index b9faf689..b6dd81f4 100644 --- a/common/rfb/DecodeManager.cxx +++ b/common/rfb/DecodeManager.cxx @@ -211,8 +211,6 @@ void DecodeManager::logStats() double ratio; - char a[1024], b[1024]; - rects = 0; pixels = bytes = equivalent = 0; @@ -228,22 +226,21 @@ void DecodeManager::logStats() ratio = (double)stats[i].equivalent / stats[i].bytes; - siPrefix(stats[i].rects, "rects", a, sizeof(a)); - siPrefix(stats[i].pixels, "pixels", b, sizeof(b)); - vlog.info(" %s: %s, %s", encodingName(i), a, b); - iecPrefix(stats[i].bytes, "B", a, sizeof(a)); + vlog.info(" %s: %s, %s", encodingName(i), + siPrefix(stats[i].rects, "rects").c_str(), + siPrefix(stats[i].pixels, "pixels").c_str()); vlog.info(" %*s %s (1:%g ratio)", (int)strlen(encodingName(i)), "", - a, ratio); + iecPrefix(stats[i].bytes, "B").c_str(), ratio); } ratio = (double)equivalent / bytes; - siPrefix(rects, "rects", a, sizeof(a)); - siPrefix(pixels, "pixels", b, sizeof(b)); - vlog.info(" Total: %s, %s", a, b); - iecPrefix(bytes, "B", a, sizeof(a)); - vlog.info(" %s (1:%g ratio)", a, ratio); + vlog.info(" Total: %s, %s", + siPrefix(rects, "rects").c_str(), + siPrefix(pixels, "pixels").c_str()); + vlog.info(" %s (1:%g ratio)", + iecPrefix(bytes, "B").c_str(), ratio); } void DecodeManager::setThreadException(const rdr::Exception& e) |