From 327534a3031a332423411c9599c741f2f81657df Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 21 Apr 2018 12:01:26 +0200 Subject: [PATCH] Fix a few Clang warnings. --- cef_capture.cpp | 2 +- cef_capture.h | 9 ++++----- nageru_cef_app.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cef_capture.cpp b/cef_capture.cpp index f692c85..b6b8cca 100644 --- a/cef_capture.cpp +++ b/cef_capture.cpp @@ -22,7 +22,7 @@ using namespace bmusb; extern CefRefPtr cef_app; CEFCapture::CEFCapture(const string &url, unsigned width, unsigned height) - : cef_client(new NageruCEFClient(width, height, this)), + : cef_client(new NageruCEFClient(this)), width(width), height(height), start_url(url) diff --git a/cef_capture.h b/cef_capture.h index 30cc487..29deded 100644 --- a/cef_capture.h +++ b/cef_capture.h @@ -35,8 +35,8 @@ class CEFCapture; class NageruCEFClient : public CefClient, public CefRenderHandler, public CefLoadHandler { public: - NageruCEFClient(int width, int height, CEFCapture *parent) - : width(width), height(height), parent(parent) {} + NageruCEFClient(CEFCapture *parent) + : parent(parent) {} CefRefPtr GetRenderHandler() override { @@ -52,14 +52,13 @@ public: void OnPaint(CefRefPtr browser, PaintElementType type, const RectList &dirtyRects, const void *buffer, int width, int height) override; - bool GetViewRect(CefRefPtr browser, CefRect &rect); + bool GetViewRect(CefRefPtr browser, CefRect &rect) override; // CefLoadHandler. void OnLoadEnd(CefRefPtr browser, CefRefPtr frame, int httpStatusCode) override; private: - int width, height; CEFCapture *parent; IMPLEMENT_REFCOUNTING(NageruCEFClient); @@ -149,7 +148,7 @@ public: assert(pixel_format == bmusb::PixelFormat_8BitBGRA); } - bmusb::PixelFormat get_current_pixel_format() const + bmusb::PixelFormat get_current_pixel_format() const override { return bmusb::PixelFormat_8BitBGRA; } diff --git a/nageru_cef_app.h b/nageru_cef_app.h index 1a7ca1a..7b8969b 100644 --- a/nageru_cef_app.h +++ b/nageru_cef_app.h @@ -76,7 +76,7 @@ public: return this; } - void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr command_line); + void OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr command_line) override; private: void cef_thread_func(); -- 2.39.2