More function declared as const

This commit is contained in:
Markus Gans 2020-07-12 17:54:13 +02:00
parent d8b35dc1a7
commit 13dc85860b
8 changed files with 30 additions and 30 deletions

View File

@ -680,7 +680,7 @@ int FOptiMove::relativeMove ( char move[]
}
//----------------------------------------------------------------------
inline int FOptiMove::verticalMove (char move[], int from_y, int to_y)
inline int FOptiMove::verticalMove (char move[], int from_y, int to_y) const
{
int vtime{LONG_DURATION};
@ -762,7 +762,7 @@ inline void FOptiMove::upMove ( char move[], int& vtime
}
//----------------------------------------------------------------------
inline int FOptiMove::horizontalMove (char hmove[], int from_x, int to_x)
inline int FOptiMove::horizontalMove (char hmove[], int from_x, int to_x) const
{
int htime{LONG_DURATION};

View File

@ -587,7 +587,7 @@ inline bool FTermXTerminal::canSetXTermBackground() const
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermColorMap()
void FTermXTerminal::resetXTermColorMap() const
{
// Reset the entire color table
@ -607,7 +607,7 @@ void FTermXTerminal::resetXTermColorMap()
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermForeground()
void FTermXTerminal::resetXTermForeground() const
{
// Reset the XTerm text foreground color
@ -621,7 +621,7 @@ void FTermXTerminal::resetXTermForeground()
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermBackground()
void FTermXTerminal::resetXTermBackground() const
{
// Reset the XTerm text background color
@ -635,7 +635,7 @@ void FTermXTerminal::resetXTermBackground()
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermCursorColor()
void FTermXTerminal::resetXTermCursorColor() const
{
// Reset the text cursor color
@ -649,7 +649,7 @@ void FTermXTerminal::resetXTermCursorColor()
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermMouseForeground()
void FTermXTerminal::resetXTermMouseForeground() const
{
// Reset the mouse foreground color
@ -663,7 +663,7 @@ void FTermXTerminal::resetXTermMouseForeground()
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermMouseBackground()
void FTermXTerminal::resetXTermMouseBackground() const
{
// Reset the mouse background color
@ -677,7 +677,7 @@ void FTermXTerminal::resetXTermMouseBackground()
}
//----------------------------------------------------------------------
void FTermXTerminal::resetXTermHighlightBackground()
void FTermXTerminal::resetXTermHighlightBackground() const
{
// Reset the highlight background color
@ -742,7 +742,7 @@ void FTermXTerminal::oscPostfix() const
}
//----------------------------------------------------------------------
const FString FTermXTerminal::captureXTermFont()
const FString FTermXTerminal::captureXTermFont() const
{
initCheck(FString{});

View File

@ -642,7 +642,7 @@ void FTextView::drawBorder()
}
//----------------------------------------------------------------------
void FTextView::drawScrollbars()
void FTextView::drawScrollbars() const
{
if ( ! hbar->isShown() && isHorizontallyScrollable() )
hbar->show();

View File

@ -228,7 +228,7 @@ void FVTerm::createVTerm (const FSize& size)
}
//----------------------------------------------------------------------
void FVTerm::resizeVTerm (const FSize& size)
void FVTerm::resizeVTerm (const FSize& size) const
{
// resize virtual terminal
@ -992,7 +992,7 @@ void FVTerm::getArea (const FRect& box, const FTermArea* area)
}
//----------------------------------------------------------------------
void FVTerm::putArea (const FTermArea* area)
void FVTerm::putArea (const FTermArea* area) const
{
// Add area changes to the virtual terminal
@ -2158,7 +2158,7 @@ bool FVTerm::clearTerm (int fillchar) const
}
//----------------------------------------------------------------------
bool FVTerm::clearFullArea (const FTermArea* area, FChar& nc)
bool FVTerm::clearFullArea (const FTermArea* area, FChar& nc) const
{
// Clear area
const int area_size = area->width * area->height;
@ -3028,7 +3028,7 @@ inline void FVTerm::appendAttributes (FChar*& next_attr) const
}
//----------------------------------------------------------------------
int FVTerm::appendLowerRight (FChar*& screen_char)
int FVTerm::appendLowerRight (FChar*& screen_char) const
{
const auto& SA = TCAP(fc::t_enter_am_mode);
const auto& RA = TCAP(fc::t_exit_am_mode);

View File

@ -170,10 +170,10 @@ class FOptiMove final
int capDurationToLength (int) const;
int repeatedAppend (const capability&, volatile int, char*) const;
int relativeMove (char[], int, int, int, int);
int verticalMove (char[], int, int);
int verticalMove (char[], int, int) const;
void downMove (char[], int&, int, int) const;
void upMove (char[], int&, int, int) const;
int horizontalMove (char[], int, int);
int horizontalMove (char[], int, int) const;
void rightMove (char[], int&, int, int) const;
void leftMove (char[], int&, int, int) const;

View File

@ -125,18 +125,18 @@ class FTermXTerminal final
void setXTerm16ColorDefaults();
void setXTermDefaultsMouseCursor();
bool canSetXTermBackground() const;
void resetXTermColorMap();
void resetXTermForeground();
void resetXTermBackground();
void resetXTermCursorColor();
void resetXTermMouseForeground();
void resetXTermMouseBackground();
void resetXTermHighlightBackground();
void resetXTermColorMap() const;
void resetXTermForeground() const;
void resetXTermBackground() const;
void resetXTermCursorColor() const;
void resetXTermMouseForeground() const;
void resetXTermMouseBackground() const;
void resetXTermHighlightBackground() const;
bool isInitialized() const;
bool canResetColor() const;
void oscPrefix() const;
void oscPostfix() const;
const FString captureXTermFont();
const FString captureXTermFont() const;
const FString captureXTermTitle() const;
static void enableXTermMouse();
static void disableXTermMouse();

View File

@ -153,7 +153,7 @@ class FTextView : public FWidget
void mapKeyFunctions();
void draw() override;
void drawBorder() override;
void drawScrollbars();
void drawScrollbars() const;
void drawText();
bool useFDialogBorder() const;
bool isPrintable (wchar_t) const;

View File

@ -251,7 +251,7 @@ class FVTerm
// Methods
virtual void clearArea (int = ' ');
void createVTerm (const FSize&);
void resizeVTerm (const FSize&);
void resizeVTerm (const FSize&) const;
void putVTerm();
void updateTerminal();
virtual void addPreprocessingHandler ( const FVTerm*
@ -309,7 +309,7 @@ class FVTerm
, bool, FTermArea* );
static void getArea (const FPoint&, const FTermArea*);
static void getArea (const FRect&, const FTermArea*);
void putArea (const FTermArea*);
void putArea (const FTermArea*) const;
static void putArea (const FPoint&, const FTermArea*);
void scrollAreaForward (FTermArea*) const;
void scrollAreaReverse (FTermArea*) const;
@ -384,7 +384,7 @@ class FVTerm
static void getAreaCharacter ( const FPoint&, const FTermArea*
, FChar*& );
bool clearTerm (int = ' ') const;
bool clearFullArea (const FTermArea*, FChar&);
bool clearFullArea (const FTermArea*, FChar&) const;
static void clearAreaWithShadow (const FTermArea*, const FChar&);
static bool canClearToEOL (uInt, uInt);
static bool canClearLeadingWS (uInt&, uInt);
@ -415,7 +415,7 @@ class FVTerm
void appendCharacter (FChar*&);
void appendChar (FChar*&) const;
void appendAttributes (FChar*&) const;
int appendLowerRight (FChar*&);
int appendLowerRight (FChar*&) const;
static void characterFilter (FChar*&);
static void appendOutputBuffer (const std::string&);
static void appendOutputBuffer (const char[]);