mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Replace macros with C++17 features (see issue #3362)
- Convert ALLOW_UNUSED_LOCAL to [[maybe_unused]] - Convert WARN_UNUSED_RESULT to [[nodiscard]]
This commit is contained in:
@@ -18,8 +18,7 @@ class ScopedGLContext {
|
||||
public:
|
||||
ScopedGLContext(HDC hdc, HGLRC hglrc, bool swap_buffers)
|
||||
: hdc_(hdc), swap_buffers_(swap_buffers) {
|
||||
BOOL result = wglMakeCurrent(hdc, hglrc);
|
||||
ALLOW_UNUSED_LOCAL(result);
|
||||
[[maybe_unused]] BOOL result = wglMakeCurrent(hdc, hglrc);
|
||||
DCHECK(result);
|
||||
}
|
||||
~ScopedGLContext() {
|
||||
@@ -188,8 +187,7 @@ void OsrRenderHandlerWinGL::DisableGL() {
|
||||
|
||||
if (IsWindow(hwnd())) {
|
||||
// wglDeleteContext will make the context not current before deleting it.
|
||||
BOOL result = wglDeleteContext(hrc_);
|
||||
ALLOW_UNUSED_LOCAL(result);
|
||||
[[maybe_unused]] BOOL result = wglDeleteContext(hrc_);
|
||||
DCHECK(result);
|
||||
ReleaseDC(hwnd(), hdc_);
|
||||
}
|
||||
|
Reference in New Issue
Block a user