From 1feb7f7edc5f8f383e594b256ef4cab0fae75b99 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Aug 2012 23:40:41 +0300 Subject: Add const to more classes. --- src/gui/textdialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/textdialog.cpp') 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); -- cgit v1.2.3-60-g2f50