]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just pass const wxArrayInt to wxHtmlCell::AdjustPagebreak().
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Feb 2012 13:02:27 +0000 (13:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Feb 2012 13:02:27 +0000 (13:02 +0000)
AdjustPagebreak() never modifies the array passed to it, so pass it as const
reference.

See #13935.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/html/htmlcell.h
interface/wx/html/htmlcell.h
src/html/htmlcell.cpp
src/html/m_layout.cpp

index 20816b952527aa2c333bf5cf4a226eecedb5fb49..b76b13c769a5574675db1b90611b5a204ad8973d 100644 (file)
@@ -280,7 +280,7 @@ public:
     // Returned value : true if pagebreak was modified, false otherwise
     // Usage : while (container->AdjustPagebreak(&p)) {}
     virtual bool AdjustPagebreak(int *pagebreak,
-                                 wxArrayInt& known_pagebreaks) const;
+                                 const wxArrayInt& known_pagebreaks) const;
 
     // Sets cell's behaviour on pagebreaks (see AdjustPagebreak). Default
     // is true - the cell can be split on two pages
@@ -440,7 +440,7 @@ public:
     virtual void DrawInvisible(wxDC& dc, int x, int y,
                                wxHtmlRenderingInfo& info);
 /*    virtual bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL, int number_of_pages = 0) const;*/
-    virtual bool AdjustPagebreak(int *pagebreak, wxArrayInt& known_pagebreaks) const;
+    virtual bool AdjustPagebreak(int *pagebreak, const wxArrayInt& known_pagebreaks) const;
 
     // insert cell at the end of m_Cells list
     void InsertCell(wxHtmlCell *cell);
index ece319d281be35a4038334ce25cc5b7392cca745..ab2edae710f6fffdee3761c95fcae85a2fe14f1f 100644 (file)
@@ -107,7 +107,7 @@ public:
         @endcode
     */
     virtual bool AdjustPagebreak(int* pagebreak,
-                                 wxArrayInt& known_pagebreaks) const;
+                                 const wxArrayInt& known_pagebreaks) const;
 
     /**
         Renders the cell.
index c775d9817f519a1873cdf6282d5e661cd271fe15..20c249ebbffba17df402f3395d88ce3abb7a175a 100644 (file)
@@ -221,7 +221,7 @@ wxCursor wxHtmlCell::GetMouseCursor(wxHtmlWindowInterface *window) const
 
 
 bool wxHtmlCell::AdjustPagebreak(int *pagebreak,
-                                 wxArrayInt& WXUNUSED(known_pagebreaks)) const
+                                 const wxArrayInt& WXUNUSED(known_pagebreaks)) const
 {
     if ((!m_CanLiveOnPagebreak) &&
                 m_PosY < *pagebreak && m_PosY + m_Height > *pagebreak)
@@ -775,7 +775,7 @@ int wxHtmlContainerCell::GetIndentUnits(int ind) const
 
 
 bool wxHtmlContainerCell::AdjustPagebreak(int *pagebreak,
-                                          wxArrayInt& known_pagebreaks) const
+                                          const wxArrayInt& known_pagebreaks) const
 {
     if (!m_CanLiveOnPagebreak)
         return wxHtmlCell::AdjustPagebreak(pagebreak, known_pagebreaks);
index c54b437c863125c8f203171d0934fad0e38cb964..7672465f96880378fa9fa04aef57868c6b383be4 100644 (file)
@@ -71,7 +71,7 @@ public:
     wxHtmlPageBreakCell() {}
 
     bool AdjustPagebreak(int* pagebreak,
-                         wxArrayInt& known_pagebreaks) const;
+                         const wxArrayInt& known_pagebreaks) const;
 
     void Draw(wxDC& WXUNUSED(dc),
               int WXUNUSED(x), int WXUNUSED(y),
@@ -82,7 +82,7 @@ private:
     wxDECLARE_NO_COPY_CLASS(wxHtmlPageBreakCell);
 };
 
-bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, wxArrayInt& known_pagebreaks) const
+bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, const wxArrayInt& known_pagebreaks) const
 {
     // When we are counting pages, 'known_pagebreaks' is non-NULL.
     // That's the only time we change 'pagebreak'. Otherwise, pages