Make some member functions const
This commit is contained in:
@@ -185,7 +185,7 @@ public:
|
||||
// set this context as the current one
|
||||
virtual bool SetCurrent(const wxGLCanvas& win) const = 0;
|
||||
|
||||
bool IsOK() { return m_isOk; }
|
||||
bool IsOK() const { return m_isOk; }
|
||||
|
||||
protected:
|
||||
bool m_isOk;
|
||||
|
@@ -876,7 +876,7 @@ public:
|
||||
virtual void EnableOffset(bool enable = true);
|
||||
|
||||
void DisableOffset() { EnableOffset(false); }
|
||||
bool OffsetEnabled() { return m_enableOffset; }
|
||||
bool OffsetEnabled() const { return m_enableOffset; }
|
||||
|
||||
protected:
|
||||
// These fields must be initialized in the derived class ctors.
|
||||
|
@@ -138,10 +138,10 @@ public:
|
||||
bool case_sensitive, bool whole_words_only,
|
||||
const wxString& book = wxEmptyString);
|
||||
bool Search(); // do the next iteration
|
||||
bool IsActive() { return m_Active; }
|
||||
int GetCurIndex() { return m_CurIndex; }
|
||||
int GetMaxIndex() { return m_MaxIndex; }
|
||||
const wxString& GetName() { return m_Name; }
|
||||
bool IsActive() const { return m_Active; }
|
||||
int GetCurIndex() const { return m_CurIndex; }
|
||||
int GetMaxIndex() const { return m_MaxIndex; }
|
||||
const wxString& GetName() const { return m_Name; }
|
||||
|
||||
const wxHtmlHelpDataItem *GetCurItem() const { return m_CurItem; }
|
||||
|
||||
|
@@ -222,7 +222,7 @@ public:
|
||||
|
||||
void SetScriptMode(wxHtmlScriptMode mode, long previousBase);
|
||||
wxHtmlScriptMode GetScriptMode() const { return m_ScriptMode; }
|
||||
long GetScriptBaseline() { return m_ScriptBaseline; }
|
||||
long GetScriptBaseline() const { return m_ScriptBaseline; }
|
||||
|
||||
// Formatting cells are not visible on the screen, they only alter
|
||||
// renderer's state.
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
void SetDC(wxDC *dc, double pixel_scale, double font_scale);
|
||||
|
||||
wxDC *GetDC() {return m_DC;}
|
||||
double GetPixelScale() {return m_PixelScale;}
|
||||
double GetPixelScale() const { return m_PixelScale; }
|
||||
int GetCharHeight() const {return m_CharHeight;}
|
||||
int GetCharWidth() const {return m_CharWidth;}
|
||||
|
||||
|
@@ -58,7 +58,7 @@ public:
|
||||
virtual ~wxConnectionBase();
|
||||
|
||||
void SetConnected( bool c ) { m_connected = c; }
|
||||
bool GetConnected() { return m_connected; }
|
||||
bool GetConnected() const { return m_connected; }
|
||||
|
||||
// Calls that CLIENT can make
|
||||
bool Execute(const void *data, size_t size, wxIPCFormat fmt = wxIPC_PRIVATE)
|
||||
|
@@ -112,14 +112,14 @@ public:
|
||||
wxEdge GetMyEdge() const { return myEdge; }
|
||||
void SetEdge(wxEdge which) { myEdge = which; }
|
||||
void SetValue(int v) { value = v; }
|
||||
int GetMargin() { return margin; }
|
||||
int GetMargin() const { return margin; }
|
||||
void SetMargin(int m) { margin = m; }
|
||||
int GetValue() const { return value; }
|
||||
int GetPercent() const { return percent; }
|
||||
int GetOtherEdge() const { return otherEdge; }
|
||||
bool GetDone() const { return done; }
|
||||
void SetDone(bool d) { done = d; }
|
||||
wxRelationship GetRelationship() { return relationship; }
|
||||
wxRelationship GetRelationship() const { return relationship; }
|
||||
void SetRelationship(wxRelationship r) { relationship = r; }
|
||||
|
||||
// Reset constraint if it mentions otherWin
|
||||
|
@@ -82,28 +82,28 @@ public:
|
||||
void AddPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h);
|
||||
|
||||
// Find by name
|
||||
wxPrintPaperType *FindPaperType(const wxString& name);
|
||||
wxPrintPaperType *FindPaperType(const wxString& name) const;
|
||||
|
||||
// Find by size id
|
||||
wxPrintPaperType *FindPaperType(wxPaperSize id);
|
||||
wxPrintPaperType *FindPaperType(wxPaperSize id) const;
|
||||
|
||||
// Find by platform id
|
||||
wxPrintPaperType *FindPaperTypeByPlatformId(int id);
|
||||
wxPrintPaperType *FindPaperTypeByPlatformId(int id) const;
|
||||
|
||||
// Find by size
|
||||
wxPrintPaperType *FindPaperType(const wxSize& size);
|
||||
wxPrintPaperType *FindPaperType(const wxSize& size) const;
|
||||
|
||||
// Convert name to size id
|
||||
wxPaperSize ConvertNameToId(const wxString& name);
|
||||
wxPaperSize ConvertNameToId(const wxString& name) const;
|
||||
|
||||
// Convert size id to name
|
||||
wxString ConvertIdToName(wxPaperSize paperId);
|
||||
wxString ConvertIdToName(wxPaperSize paperId) const;
|
||||
|
||||
// Get the paper size
|
||||
wxSize GetSize(wxPaperSize paperId);
|
||||
wxSize GetSize(wxPaperSize paperId) const;
|
||||
|
||||
// Get the paper size
|
||||
wxPaperSize GetSize(const wxSize& size);
|
||||
wxPaperSize GetSize(const wxSize& size) const;
|
||||
|
||||
//
|
||||
wxPrintPaperType* Item(size_t index) const;
|
||||
|
@@ -167,10 +167,10 @@ public:
|
||||
|
||||
// accessors
|
||||
// PID of process which terminated
|
||||
int GetPid() { return m_pid; }
|
||||
int GetPid() const { return m_pid; }
|
||||
|
||||
// the exit code
|
||||
int GetExitCode() { return m_exitcode; }
|
||||
int GetExitCode() const { return m_exitcode; }
|
||||
|
||||
// implement the base class pure virtual
|
||||
virtual wxEvent *Clone() const wxOVERRIDE { return new wxProcessEvent(*this); }
|
||||
|
Reference in New Issue
Block a user