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.
This commit is contained in:
Vadim Zeitlin
2018-05-21 19:06:21 +02:00
parent a56b993c55
commit 9fa9880f97
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ public:
// set the same pagebreak twice. // set the same pagebreak twice.
// //
// CAUTION! Render() changes DC's user scale and does NOT restore it! // 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); int dont_render = false, int to = INT_MAX);
// returns total width of the html document // returns total width of the html document

View File

@@ -141,7 +141,7 @@ void wxHtmlDCRenderer::SetStandardFonts(int size,
} }
int wxHtmlDCRenderer::Render(int x, int y, int wxHtmlDCRenderer::Render(int x, int y,
wxArrayInt& known_pagebreaks, const wxArrayInt& known_pagebreaks,
int from, int dont_render, int to) int from, int dont_render, int to)
{ {
wxCHECK_MSG( m_Cells, 0, "SetHtmlText() must be called before Render()" ); wxCHECK_MSG( m_Cells, 0, "SetHtmlText() must be called before Render()" );