summaryrefslogtreecommitdiff
path: root/src/gui/textdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-29 23:40:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-29 23:40:41 +0300
commit1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (patch)
tree68fe26fdd1ef25645deef894c296b6fbc80b0e13 /src/gui/textdialog.cpp
parent41044107cc0a17125ebd806c9934b6eb636dafe6 (diff)
downloadmv-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.tar.gz
mv-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.tar.bz2
mv-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.tar.xz
mv-1feb7f7edc5f8f383e594b256ef4cab0fae75b99.zip
Add const to more classes.
Diffstat (limited to 'src/gui/textdialog.cpp')
-rw-r--r--src/gui/textdialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/textdialog.cpp b/src/gui/textdialog.cpp
index b7f8a6ce3..3e49eea97 100644
--- a/src/gui/textdialog.cpp
+++ b/src/gui/textdialog.cpp
@@ -37,7 +37,7 @@
int TextDialog::instances = 0;
TextDialog::TextDialog(const std::string &title, const std::string &msg,
- Window *parent, bool isPassword):
+ Window *const parent, const bool isPassword):
Window(title, true, parent, "textdialog.xml"),
mTextField(nullptr),
mPasswordField(nullptr)
@@ -45,9 +45,9 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg,
mEnabledKeyboard = keyboard.isEnabled();
keyboard.setEnabled(false);
- gcn::Label *textLabel = new Label(msg);
+ gcn::Label *const textLabel = new Label(msg);
mOkButton = new Button(_("OK"), "OK", this);
- gcn::Button *cancelButton = new Button(_("Cancel"), "CANCEL", this);
+ gcn::Button *const cancelButton = new Button(_("Cancel"), "CANCEL", this);
place(0, 0, textLabel, 4);
if (isPassword)
@@ -63,7 +63,7 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg,
place(2, 2, mOkButton);
place(3, 2, cancelButton);
- gcn::Font *font = getFont();
+ const gcn::Font *const font = getFont();
if (font)
{
int width = font->getWidth(title);