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:
@@ -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
|
||||||
|
@@ -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()" );
|
||||||
|
Reference in New Issue
Block a user