textbox: use parameters as const &bool

Origin commit data
------------------
Commit: c44e35da5a
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-10-27 (Sun, 27 Oct 2019)
This commit is contained in:
2019-10-27 22:56:50 +01:00
committed by vanhofen
parent 886ab615d8
commit 3b0258d551
2 changed files with 4 additions and 4 deletions

View File

@@ -875,7 +875,7 @@ bool CTextBox::clearScreenBuffer()
return false;
}
bool CTextBox::enableSaveScreen(bool mode)
bool CTextBox::enableSaveScreen(const bool& mode)
{
if (m_SaveScreen == mode)
return false;
@@ -939,7 +939,7 @@ int CTextBox::getMaxLineWidth(const std::string& text, Font* font)
return len;
}
void CTextBox::enableBackgroundPaint(bool mode)
void CTextBox::enableBackgroundPaint(const bool& mode)
{
m_nPaintBackground = mode;
}

View File

@@ -181,10 +181,10 @@ class CTextBox : public sigc::trackable
void refresh(void);
void scrollPageDown(const int pages);
void scrollPageUp(const int pages);
void enableBackgroundPaint(bool mode = true);
void enableBackgroundPaint(const bool& mode = true);
void disableBackgroundPaint();
//enable screen saving behind chars, is required for transparent text paint, returns true if mode was changed
bool enableSaveScreen(bool mode = true);
bool enableSaveScreen(const bool& mode = true);
bool setText(const std::string* newText, int max_width = 0, bool force_repaint = true);
void setTextColor(fb_pixel_t color_text){ m_textColor = color_text;};
void setBackGroundRadius(const int radius, const int type = CORNER_ALL){m_nBgRadius = radius; m_nBgRadiusType = type;};