From c99f0ad5bd52af830ee3f73fb9d2cb555695ff7d Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 6 Jan 2026 16:41:45 +0100 Subject: [PATCH] vdisp/gl: gamma ramp print simplified Do not use ostringstream, print directly to logger - this will change the output a bit, namely MOD_NAME (+ timestamp) will be prepended on every line but it perhaps doesn't matter much. --- src/video_display/gl.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/video_display/gl.cpp b/src/video_display/gl.cpp index 99724107c..54c455b29 100644 --- a/src/video_display/gl.cpp +++ b/src/video_display/gl.cpp @@ -106,7 +106,6 @@ using std::lock_guard; using std::map; using std::min; using std::mutex; -using std::ostringstream; using std::queue; using std::stof; using std::stoi; @@ -1767,15 +1766,11 @@ static void print_gamma_ramp(GLFWmonitor *monitor) { LOG(LOG_LEVEL_ERROR) << MOD_NAME << "Cannot get gamma ramp!\n"; return; } - ostringstream oss; - oss << "Gamma ramp:\n"; + MSG(VERBOSE, "Gamma ramp:\n"); for (unsigned int i = 0; i < ramp->size; ++i) { - oss << "r[" << i << "]=" << ramp->red[i] << - ", g[" << i << "]=" << ramp->green[i] << - ", b[" << i << "]=" << ramp->blue[i] << "\n"; - + MSG(VERBOSE, "r[%u]=%hd, g[%u]=%hd, b[%u]=%hd\n", i, + ramp->red[i], i, ramp->green[i], i, ramp->blue[i]); } - LOG(LOG_LEVEL_VERBOSE) << MOD_NAME << oss.str(); } static void set_gamma(struct state_gl *s) {