From 46f0755975033f37eaae9db73c0e2b6499c2a923 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Aug 2012 02:10:59 +0300 Subject: Add const to more classes. --- src/gui/widgets/browserbox.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/gui/widgets/browserbox.h') diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index c19256afa..ed7208031 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -46,13 +46,15 @@ struct BROWSER_LINK class LinePart { public: - LinePart(int x, int y, gcn::Color color, std::string text, bool bold) : + LinePart(const int x, const int y, const gcn::Color color, + const std::string &text, const bool bold) : mX(x), mY(y), mColor(color), mText(text), mType(0), mImage(nullptr), mBold(bold) { } - LinePart(int x, int y, gcn::Color color, Image *image) : + LinePart(const int x, const int y, const gcn::Color color, + Image *const image) : mX(x), mY(y), mColor(color), mText(""), mType(1), mImage(image), mBold(false) { @@ -79,7 +81,8 @@ class BrowserBox : public gcn::Widget, /** * Constructor. */ - BrowserBox(unsigned int mode = AUTO_SIZE, bool opaque = true); + BrowserBox(const unsigned int mode = AUTO_SIZE, + const bool opaque = true); /** * Destructor. @@ -99,7 +102,7 @@ class BrowserBox : public gcn::Widget, /** * Sets the Highlight mode for links. */ - void setHighlightMode(unsigned int highMode); + void setHighlightMode(const unsigned int highMode); /** * Sets the maximum numbers of rows in the browser box. 0 = no limit. @@ -116,12 +119,12 @@ class BrowserBox : public gcn::Widget, /** * Adds a text row to the browser. */ - void addRow(const std::string &row, bool atTop = false); + void addRow(const std::string &row, const bool atTop = false); /** * Adds a menu line to the browser. */ - void addRow(const std::string &cmd, char *text); + void addRow(const std::string &cmd, const char *const text); void addImage(const std::string &path); -- cgit v1.2.3-70-g09d2