Make wxPalette ctor and Create() const-correct in wxMSW.

The input data is never modified so should be const (it is also documented as
being const and actually is const in the other ports).

Closes #13776.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-17 23:52:47 +00:00
parent 05f5b3f745
commit 913ce2990e
2 changed files with 8 additions and 8 deletions

View File

@@ -19,13 +19,13 @@ class WXDLLIMPEXP_CORE wxPalette : public wxPaletteBase
public:
wxPalette() { }
wxPalette(int n,
unsigned char *red, unsigned char *green, unsigned char *blue)
const unsigned char *red, const unsigned char *green, const unsigned char *blue)
{
Create(n, red, green, blue);
}
bool Create(int n,
unsigned char *red, unsigned char *green, unsigned char *blue);
const unsigned char *red, const unsigned char *green, const unsigned char *blue);
virtual int GetColoursCount() const;

View File

@@ -32,9 +32,9 @@ public:
wxPaletteRefData() { Init(); }
wxPaletteRefData(int n,
unsigned char *red,
unsigned char *green,
unsigned char *blue)
const unsigned char *red,
const unsigned char *green,
const unsigned char *blue)
{
Init();
@@ -117,9 +117,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
#define M_PALETTEDATA ((wxPaletteRefData *)m_refData)
bool wxPalette::Create(int n,
unsigned char *red,
unsigned char *green,
unsigned char *blue)
const unsigned char *red,
const unsigned char *green,
const unsigned char *blue)
{
m_refData = new wxPaletteRefData(n, red, green, blue);