From 9fa9880f979ee9abefcf18e4685e1ef56ff7592b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 21 May 2018 19:06:21 +0200 Subject: [PATCH] Pass known page breaks as const ref to wxHtmlDCRenderer::Render() This method doesn't modify the known page breaks, it only uses them to find the next one, so make it more clear by using const reference in the function signature. --- include/wx/html/htmprint.h | 2 +- src/html/htmprint.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index 71ef634f88..5e4584aec1 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -78,7 +78,7 @@ public: // set the same pagebreak twice. // // CAUTION! Render() changes DC's user scale and does NOT restore it! - int Render(int x, int y, wxArrayInt& known_pagebreaks, int from = 0, + int Render(int x, int y, const wxArrayInt& known_pagebreaks, int from = 0, int dont_render = false, int to = INT_MAX); // returns total width of the html document diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 1403019851..c2195cc266 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -141,7 +141,7 @@ void wxHtmlDCRenderer::SetStandardFonts(int size, } int wxHtmlDCRenderer::Render(int x, int y, - wxArrayInt& known_pagebreaks, + const wxArrayInt& known_pagebreaks, int from, int dont_render, int to) { wxCHECK_MSG( m_Cells, 0, "SetHtmlText() must be called before Render()" );