summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-20 21:19:35 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-20 21:19:35 +0300
commit3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9 (patch)
tree2053748aba4fd1e01020effe9322757426354d28 /src/gui/widgets/textbox.cpp
parent2577a25f8a4acf587526809fda2ded95875e1222 (diff)
downloadplus-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.tar.gz
plus-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.tar.bz2
plus-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.tar.xz
plus-3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9.zip
Add missing const in gui directory.
Diffstat (limited to 'src/gui/widgets/textbox.cpp')
-rw-r--r--src/gui/widgets/textbox.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index 8478e767e..d1c10be67 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -437,7 +437,7 @@ void TextBox::keyPressed(KeyEvent& event)
event.consume();
}
-void TextBox::draw(Graphics* graphics)
+void TextBox::draw(Graphics *const graphics)
{
BLOCK_START("TextBox::draw")
if (mOpaque)
@@ -468,7 +468,7 @@ void TextBox::draw(Graphics* graphics)
BLOCK_END("TextBox::draw")
}
-void TextBox::safeDraw(Graphics* graphics)
+void TextBox::safeDraw(Graphics *const graphics)
{
TextBox::draw(graphics);
}
@@ -514,8 +514,9 @@ void TextBox::setTextRow(const int row, const std::string& text)
void TextBox::setCaretPosition(unsigned int position)
{
- for (int row = 0, sz = CAST_S32(mTextRows.size());
- row < sz; row ++)
+ for (int row = 0, fsz = CAST_S32(mTextRows.size());
+ row < fsz;
+ row ++)
{
if (position <= mTextRows[row].size())
{
@@ -619,7 +620,9 @@ void TextBox::mouseDragged(MouseEvent& event)
event.consume();
}
-void TextBox::drawCaret(Graphics *const graphics, const int x, const int y)
+void TextBox::drawCaret(Graphics *const graphics,
+ const int x,
+ const int y) const
{
graphics->setColor(mForegroundColor);
graphics->drawLine(x, getFont()->getHeight() + y, x, y);