More function declared as const
This commit is contained in:
parent
13dc85860b
commit
f07a481d46
|
@ -641,7 +641,7 @@ int FOptiMove::repeatedAppend ( const capability& o
|
|||
//----------------------------------------------------------------------
|
||||
int FOptiMove::relativeMove ( char move[]
|
||||
, int from_x, int from_y
|
||||
, int to_x, int to_y )
|
||||
, int to_x, int to_y ) const
|
||||
{
|
||||
int vtime{0};
|
||||
int htime{0};
|
||||
|
|
|
@ -202,7 +202,7 @@ void FTermXTerminal::setDefaults()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FTermXTerminal::resetColorMap()
|
||||
void FTermXTerminal::resetColorMap() const
|
||||
{
|
||||
// Reset the entire color table
|
||||
|
||||
|
|
|
@ -1256,7 +1256,7 @@ void FVTerm::scrollAreaReverse (FTermArea* area) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FVTerm::clearArea (FTermArea* area, int fillchar)
|
||||
void FVTerm::clearArea (FTermArea* area, int fillchar) const
|
||||
{
|
||||
// Clear the area with the current attributes
|
||||
|
||||
|
@ -1682,7 +1682,7 @@ bool FVTerm::updateVTermCharacter ( const FTermArea* area
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FVTerm::updateVTerm()
|
||||
void FVTerm::updateVTerm() const
|
||||
{
|
||||
// Updates the character data from all areas to VTerm
|
||||
|
||||
|
@ -2991,7 +2991,7 @@ inline void FVTerm::charsetChanges (FChar*& next_char)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FVTerm::appendCharacter (FChar*& next_char)
|
||||
inline void FVTerm::appendCharacter (FChar*& next_char) const
|
||||
{
|
||||
const int term_width = vterm->width - 1;
|
||||
const int term_height = vterm->height - 1;
|
||||
|
|
|
@ -31,9 +31,29 @@ template<typename T>
|
|||
struct FData
|
||||
{
|
||||
explicit FData (T v)
|
||||
: value(v)
|
||||
: value{v}
|
||||
{ }
|
||||
|
||||
FData (const FData& d) // Copy constructor
|
||||
: value{d.value}
|
||||
{ }
|
||||
|
||||
FData& operator = (const FData& d) // Copy assignment operator (=)
|
||||
{
|
||||
value = d.value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FData (FData&& d) noexcept // Move constructor
|
||||
: value{std::move(d.value)}
|
||||
{ }
|
||||
|
||||
FData& operator = (FData&& d) noexcept // Move assignment operator (=)
|
||||
{
|
||||
value = std::move(d.value);
|
||||
return *this;
|
||||
}
|
||||
|
||||
T operator () () const
|
||||
{
|
||||
return value;
|
||||
|
|
|
@ -327,7 +327,7 @@ class FTimerEvent : public FEvent // timer event
|
|||
// class FUserEvent
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class FUserEvent : public FEvent // timer event
|
||||
class FUserEvent : public FEvent // user event
|
||||
{
|
||||
public:
|
||||
FUserEvent() = default;
|
||||
|
|
|
@ -169,7 +169,7 @@ class FOptiMove final
|
|||
int capDuration (const char[], int) const;
|
||||
int capDurationToLength (int) const;
|
||||
int repeatedAppend (const capability&, volatile int, char*) const;
|
||||
int relativeMove (char[], int, int, int, int);
|
||||
int relativeMove (char[], int, int, int, int) const;
|
||||
int verticalMove (char[], int, int) const;
|
||||
void downMove (char[], int&, int, int) const;
|
||||
void upMove (char[], int&, int, int) const;
|
||||
|
|
|
@ -98,7 +98,7 @@ class FTermXTerminal final
|
|||
// Methods
|
||||
void init();
|
||||
void setDefaults();
|
||||
void resetColorMap();
|
||||
void resetColorMap() const;
|
||||
void resetForeground();
|
||||
void resetBackground();
|
||||
void resetCursorColor();
|
||||
|
|
|
@ -313,7 +313,7 @@ class FVTerm
|
|||
static void putArea (const FPoint&, const FTermArea*);
|
||||
void scrollAreaForward (FTermArea*) const;
|
||||
void scrollAreaReverse (FTermArea*) const;
|
||||
void clearArea (FTermArea*, int = ' ');
|
||||
void clearArea (FTermArea*, int = ' ') const;
|
||||
void processTerminalUpdate();
|
||||
static void startTerminalUpdate();
|
||||
static void finishTerminalUpdate();
|
||||
|
@ -364,7 +364,7 @@ class FVTerm
|
|||
static bool updateVTermCharacter ( const FTermArea*
|
||||
, const FPoint&
|
||||
, const FPoint& );
|
||||
void updateVTerm();
|
||||
void updateVTerm() const;
|
||||
static void callPreprocessingHandler (const FTermArea*);
|
||||
bool hasChildAreaChanges (FTermArea*) const;
|
||||
void clearChildAreaChanges (const FTermArea*) const;
|
||||
|
@ -412,7 +412,7 @@ class FVTerm
|
|||
static void markAsPrinted (uInt, uInt, uInt);
|
||||
static void newFontChanges (FChar*&);
|
||||
static void charsetChanges (FChar*&);
|
||||
void appendCharacter (FChar*&);
|
||||
void appendCharacter (FChar*&) const;
|
||||
void appendChar (FChar*&) const;
|
||||
void appendAttributes (FChar*&) const;
|
||||
int appendLowerRight (FChar*&) const;
|
||||
|
|
Loading…
Reference in New Issue