diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-24 15:48:34 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-11-30 14:45:17 +0000 |
commit | 9ef93fa153e9093f7b1b9c901192dcf8282b6c3d (patch) | |
tree | de418a632ef0a7f7d969c7dfe08e166368a069c1 /src/plugins/platforms/windows/qwindowsglcontext.h | |
parent | 39fc377bf105ba09e2a8f9acae467dc789b96525 (diff) |
Windows QPA plugin: Use member initialization
Use C++ 11 member initialization in value-type structs.
Task-number: QTBUG-51673
Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsglcontext.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h index 4c804a612e..c2383f76db 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.h +++ b/src/plugins/platforms/windows/qwindowsglcontext.h @@ -72,24 +72,23 @@ struct QWindowsOpenGLAdditionalFormat struct QOpenGLContextData { QOpenGLContextData(HGLRC r, HWND h, HDC d) : renderingContext(r), hwnd(h), hdc(d) {} - QOpenGLContextData() : renderingContext(0), hwnd(0), hdc(0) {} + QOpenGLContextData() {} - HGLRC renderingContext; - HWND hwnd; - HDC hdc; + HGLRC renderingContext = 0; + HWND hwnd = 0; + HDC hdc = 0; }; class QOpenGLStaticContext; struct QWindowsOpenGLContextFormat { - QWindowsOpenGLContextFormat(); static QWindowsOpenGLContextFormat current(); void apply(QSurfaceFormat *format) const; - QSurfaceFormat::OpenGLContextProfile profile; - int version; //! majorVersion<<8 + minorVersion - QSurfaceFormat::FormatOptions options; + QSurfaceFormat::OpenGLContextProfile profile = QSurfaceFormat::NoProfile; + int version = 0; //! majorVersion<<8 + minorVersion + QSurfaceFormat::FormatOptions options = 0; }; #ifndef QT_NO_DEBUG_STREAM |