[Libreoffice-commits] core.git: vcl/source

Tor Lillqvist tml at collabora.com
Fri Nov 13 08:51:41 PST 2015


 vcl/source/opengl/OpenGLHelper.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 38357ee010e9f22bc00080e603880cf82c74da48
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 13 18:47:11 2015 +0200

    OpenGL error codes are defined in hex, so show them as such
    
    Change-Id: I1f7fd98b243c49bfd90060b297bb2391cb102bb3

diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index f16f217..79833d7 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -695,11 +695,10 @@ void OpenGLHelper::checkGLError(const char* pFile, size_t nLine)
             break;
         }
         const char* sError = OpenGLHelper::GLErrorString(glErr);
+        if (!sError)
+            sError = "no message available";
 
-        if (sError)
-            SAL_WARN("vcl.opengl", "GL Error #" << glErr << "(" << sError << ") in File " << pFile << " at line: " << nLine);
-        else
-            SAL_WARN("vcl.opengl", "GL Error #" << glErr << " (no message available) in File " << pFile << " at line: " << nLine);
+        SAL_WARN("vcl.opengl", "GL Error " << std::hex << std::setw(4) << std::setfill('0') << glErr << std::dec << std::setw(0) << std::setfill(' ') << " (" << sError << ") in file " << pFile << " at line " << nLine);
 
         // tdf#93798 - apitrace appears to sometimes cause issues with an infinite loop here.
         if (++nErrors >= 8)


More information about the Libreoffice-commits mailing list