More function declared as const
This commit is contained in:
parent
f07a481d46
commit
8f383a4def
|
@ -927,7 +927,7 @@ inline bool FOptiMove::isMethod0Faster ( int& move_time
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FOptiMove::isMethod1Faster ( int& move_time
|
inline bool FOptiMove::isMethod1Faster ( int& move_time
|
||||||
, int xold, int yold
|
, int xold, int yold
|
||||||
, int xnew, int ynew )
|
, int xnew, int ynew ) const
|
||||||
{
|
{
|
||||||
// Test method 1: local movement
|
// Test method 1: local movement
|
||||||
|
|
||||||
|
@ -949,7 +949,7 @@ inline bool FOptiMove::isMethod1Faster ( int& move_time
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FOptiMove::isMethod2Faster ( int& move_time
|
inline bool FOptiMove::isMethod2Faster ( int& move_time
|
||||||
, int yold
|
, int yold
|
||||||
, int xnew, int ynew )
|
, int xnew, int ynew ) const
|
||||||
{
|
{
|
||||||
// Test method 2: carriage-return + local movement
|
// Test method 2: carriage-return + local movement
|
||||||
|
|
||||||
|
@ -971,7 +971,7 @@ inline bool FOptiMove::isMethod2Faster ( int& move_time
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FOptiMove::isMethod3Faster ( int& move_time
|
inline bool FOptiMove::isMethod3Faster ( int& move_time
|
||||||
, int xnew, int ynew )
|
, int xnew, int ynew ) const
|
||||||
{
|
{
|
||||||
// Test method 3: home-cursor + local movement
|
// Test method 3: home-cursor + local movement
|
||||||
|
|
||||||
|
@ -993,7 +993,7 @@ inline bool FOptiMove::isMethod3Faster ( int& move_time
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FOptiMove::isMethod4Faster ( int& move_time
|
inline bool FOptiMove::isMethod4Faster ( int& move_time
|
||||||
, int xnew, int ynew )
|
, int xnew, int ynew ) const
|
||||||
{
|
{
|
||||||
// Test method 4: home-down + local movement
|
// Test method 4: home-down + local movement
|
||||||
if ( F_cursor_to_ll.cap )
|
if ( F_cursor_to_ll.cap )
|
||||||
|
@ -1017,7 +1017,7 @@ inline bool FOptiMove::isMethod4Faster ( int& move_time
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FOptiMove::isMethod5Faster ( int& move_time
|
inline bool FOptiMove::isMethod5Faster ( int& move_time
|
||||||
, int yold
|
, int yold
|
||||||
, int xnew, int ynew )
|
, int xnew, int ynew ) const
|
||||||
{
|
{
|
||||||
// Test method 5: left margin for wrap to right-hand side
|
// Test method 5: left margin for wrap to right-hand side
|
||||||
if ( automatic_left_margin
|
if ( automatic_left_margin
|
||||||
|
|
|
@ -2444,7 +2444,7 @@ void FVTerm::printCharacter ( uInt& x, uInt y, bool min_and_not_max
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FVTerm::printFullWidthCharacter ( uInt& x, uInt y
|
void FVTerm::printFullWidthCharacter ( uInt& x, uInt y
|
||||||
, FChar*& print_char )
|
, FChar*& print_char ) const
|
||||||
{
|
{
|
||||||
const auto vt = vterm;
|
const auto vt = vterm;
|
||||||
auto next_char = &vt->data[y * uInt(vt->width) + x + 1];
|
auto next_char = &vt->data[y * uInt(vt->width) + x + 1];
|
||||||
|
@ -2483,7 +2483,7 @@ void FVTerm::printFullWidthCharacter ( uInt& x, uInt y
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FVTerm::printFullWidthPaddingCharacter ( uInt& x, uInt y
|
void FVTerm::printFullWidthPaddingCharacter ( uInt& x, uInt y
|
||||||
, FChar*& print_char)
|
, FChar*& print_char) const
|
||||||
{
|
{
|
||||||
const auto vt = vterm;
|
const auto vt = vterm;
|
||||||
auto prev_char = &vt->data[y * uInt(vt->width) + x - 1];
|
auto prev_char = &vt->data[y * uInt(vt->width) + x - 1];
|
||||||
|
@ -2528,7 +2528,7 @@ void FVTerm::printFullWidthPaddingCharacter ( uInt& x, uInt y
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FVTerm::printHalfCovertFullWidthCharacter ( uInt& x, uInt y
|
void FVTerm::printHalfCovertFullWidthCharacter ( uInt& x, uInt y
|
||||||
, FChar*& print_char )
|
, FChar*& print_char ) const
|
||||||
{
|
{
|
||||||
const auto vt = vterm;
|
const auto vt = vterm;
|
||||||
auto prev_char = &vt->data[y * uInt(vt->width) + x - 1];
|
auto prev_char = &vt->data[y * uInt(vt->width) + x - 1];
|
||||||
|
@ -2576,7 +2576,7 @@ inline void FVTerm::skipPaddingCharacter ( uInt& x, uInt y
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FVTerm::exit_state FVTerm::eraseCharacters ( uInt& x, uInt xmax, uInt y
|
FVTerm::exit_state FVTerm::eraseCharacters ( uInt& x, uInt xmax, uInt y
|
||||||
, bool draw_trailing_ws )
|
, bool draw_trailing_ws ) const
|
||||||
{
|
{
|
||||||
// Erase a number of characters to draw simple whitespaces
|
// Erase a number of characters to draw simple whitespaces
|
||||||
|
|
||||||
|
@ -2641,7 +2641,7 @@ FVTerm::exit_state FVTerm::eraseCharacters ( uInt& x, uInt xmax, uInt y
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FVTerm::exit_state FVTerm::repeatCharacter (uInt& x, uInt xmax, uInt y)
|
FVTerm::exit_state FVTerm::repeatCharacter (uInt& x, uInt xmax, uInt y) const
|
||||||
{
|
{
|
||||||
// Repeat one character n-fold
|
// Repeat one character n-fold
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,13 @@
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct FData
|
struct FData
|
||||||
{
|
{
|
||||||
explicit FData (T v)
|
explicit FData (T v) // constructor
|
||||||
: value{v}
|
: value{v}
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
~FData() // destructor
|
||||||
|
{ }
|
||||||
|
|
||||||
FData (const FData& d) // Copy constructor
|
FData (const FData& d) // Copy constructor
|
||||||
: value{d.value}
|
: value{d.value}
|
||||||
{ }
|
{ }
|
||||||
|
|
|
@ -179,11 +179,11 @@ class FOptiMove final
|
||||||
|
|
||||||
bool isWideMove (int, int, int, int) const;
|
bool isWideMove (int, int, int, int) const;
|
||||||
bool isMethod0Faster (int&, int, int);
|
bool isMethod0Faster (int&, int, int);
|
||||||
bool isMethod1Faster (int&, int, int, int, int);
|
bool isMethod1Faster (int&, int, int, int, int) const;
|
||||||
bool isMethod2Faster (int&, int, int, int);
|
bool isMethod2Faster (int&, int, int, int) const;
|
||||||
bool isMethod3Faster (int&, int, int);
|
bool isMethod3Faster (int&, int, int) const;
|
||||||
bool isMethod4Faster (int&, int, int);
|
bool isMethod4Faster (int&, int, int) const;
|
||||||
bool isMethod5Faster (int&, int, int, int);
|
bool isMethod5Faster (int&, int, int, int) const;
|
||||||
void moveByMethod (int, int, int, int, int);
|
void moveByMethod (int, int, int, int, int);
|
||||||
|
|
||||||
// Data members
|
// Data members
|
||||||
|
|
|
@ -393,12 +393,12 @@ class FVTerm
|
||||||
void printRange (uInt, uInt, uInt, bool);
|
void printRange (uInt, uInt, uInt, bool);
|
||||||
void replaceNonPrintableFullwidth (uInt, FChar*&) const;
|
void replaceNonPrintableFullwidth (uInt, FChar*&) const;
|
||||||
void printCharacter (uInt&, uInt, bool, FChar*&);
|
void printCharacter (uInt&, uInt, bool, FChar*&);
|
||||||
void printFullWidthCharacter (uInt&, uInt, FChar*&);
|
void printFullWidthCharacter (uInt&, uInt, FChar*&) const;
|
||||||
void printFullWidthPaddingCharacter (uInt&, uInt, FChar*&);
|
void printFullWidthPaddingCharacter (uInt&, uInt, FChar*&) const;
|
||||||
void printHalfCovertFullWidthCharacter (uInt&, uInt, FChar*&);
|
void printHalfCovertFullWidthCharacter (uInt&, uInt, FChar*&) const;
|
||||||
void skipPaddingCharacter (uInt&, uInt, const FChar* const&) const;
|
void skipPaddingCharacter (uInt&, uInt, const FChar* const&) const;
|
||||||
exit_state eraseCharacters (uInt&, uInt, uInt, bool);
|
exit_state eraseCharacters (uInt&, uInt, uInt, bool) const;
|
||||||
exit_state repeatCharacter (uInt&, uInt, uInt);
|
exit_state repeatCharacter (uInt&, uInt, uInt) const;
|
||||||
bool isFullWidthChar (const FChar* const&) const;
|
bool isFullWidthChar (const FChar* const&) const;
|
||||||
bool isFullWidthPaddingChar (const FChar* const&) const;
|
bool isFullWidthPaddingChar (const FChar* const&) const;
|
||||||
static void cursorWrap();
|
static void cursorWrap();
|
||||||
|
|
Loading…
Reference in New Issue