Correction of methods that were unnecessarily declared as virtual

This commit is contained in:
Markus Gans 2020-04-04 20:58:47 +02:00
parent 53f1059312
commit bb52b6fd7e
22 changed files with 28 additions and 29 deletions

View File

@ -4,7 +4,7 @@ Benchmark
The Rotozoomer example can perform a benchmark run with the parameter "-b" to determine the FINAL CUT character speed in the terminal. The Rotozoomer example can perform a benchmark run with the parameter "-b" to determine the FINAL CUT character speed in the terminal.
[![rotozoomer-benchmark](https://asciinema.org/a/smuTNcVd7uJ9InchzXmGhDtIX.svg)](https://asciinema.org/a/smuTNcVd7uJ9InchzXmGhDtIX) [![rotozoomer-benchmark](https://asciinema.org/a/316531.svg)](https://asciinema.org/a/316531)
Speed tests Speed tests

View File

@ -211,7 +211,7 @@ inline finalcut::FString RotoZoomer::getReport()
void RotoZoomer::onShow (finalcut::FShowEvent*) void RotoZoomer::onShow (finalcut::FShowEvent*)
{ {
if ( ! benchmark ) if ( ! benchmark )
addTimer(33); addTimer(33); // Starts the timer every 33 milliseconds
else else
{ {
for (path = 1; path < loops; path++) for (path = 1; path < loops; path++)

View File

@ -623,7 +623,7 @@ void indexExample()
{ {
// Test: get character access at a specified index position // Test: get character access at a specified index position
finalcut::FString index{5}; // string with five characters finalcut::FString index{5}; // string with five characters
index = "index"; index.setString("index");
try try
{ {

View File

@ -250,7 +250,7 @@ void MainWindow::onClose (finalcut::FCloseEvent* ev)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void MainWindow::onShow (finalcut::FShowEvent*) void MainWindow::onShow (finalcut::FShowEvent*)
{ {
addTimer(100); addTimer(100); // Call onTimer() every 100 ms
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -128,7 +128,7 @@ ProgressDialog::~ProgressDialog() // destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void ProgressDialog::onShow (finalcut::FShowEvent*) void ProgressDialog::onShow (finalcut::FShowEvent*)
{ {
addTimer(15); addTimer(15); // Starts the timer every 15 ms
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -156,11 +156,11 @@ void Watch::cb_clock (finalcut::FWidget*, FDataPtr)
if ( clock_sw.isChecked() ) if ( clock_sw.isChecked() )
{ {
printTime(); printTime();
addTimer(1000); addTimer(1000); // Call onTimer() every second (1000 ms)
} }
else else
{ {
delAllTimer(); delAllTimer(); // Delete all timers and stop updating the time
time_str = "--:--:--"; time_str = "--:--:--";
time_str.redraw(); time_str.redraw();
} }

View File

@ -2738,12 +2738,11 @@ void FListView::stepBackward (int distance)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListView::scrollToX (int x) void FListView::scrollToX (int x)
{ {
const int xoffset_end = int(max_line_width) - int(getClientWidth());
if ( xoffset == x ) if ( xoffset == x )
return; return;
xoffset = x; xoffset = x;
const int xoffset_end = int(max_line_width) - int(getClientWidth());
if ( xoffset > xoffset_end ) if ( xoffset > xoffset_end )
xoffset = xoffset_end; xoffset = xoffset_end;

View File

@ -51,13 +51,13 @@ class FColorPalette final
FColorPalette() = default; FColorPalette() = default;
// Destructor // Destructor
virtual ~FColorPalette(); ~FColorPalette();
// Typedefs // Typedefs
typedef void (*funcp)(FColor, int, int, int); typedef void (*funcp)(FColor, int, int, int);
// Accessor // Accessor
virtual const FString getClassName() const; const FString getClassName() const;
// Methods // Methods
static void set8ColorPalette (funcp); static void set8ColorPalette (funcp);

View File

@ -93,13 +93,13 @@ class FKeyboard final
FKeyboard (const FKeyboard&) = delete; FKeyboard (const FKeyboard&) = delete;
// Destructor // Destructor
virtual ~FKeyboard(); ~FKeyboard();
// Disable assignment operator (=) // Disable assignment operator (=)
FKeyboard& operator = (const FKeyboard&) = delete; FKeyboard& operator = (const FKeyboard&) = delete;
// Accessors // Accessors
virtual const FString getClassName() const; const FString getClassName() const;
FKey getKey(); FKey getKey();
const FString getKeyName (const FKey); const FString getKeyName (const FKey);
keybuffer& getKeyBuffer(); keybuffer& getKeyBuffer();

View File

@ -121,7 +121,7 @@ class FOptiAttr final
FOptiAttr (const FOptiAttr&) = delete; FOptiAttr (const FOptiAttr&) = delete;
// Destructor // Destructor
virtual ~FOptiAttr(); ~FOptiAttr();
// Disable assignment operator (=) // Disable assignment operator (=)
FOptiAttr& operator = (const FOptiAttr&) = delete; FOptiAttr& operator = (const FOptiAttr&) = delete;

View File

@ -106,7 +106,7 @@ class FOptiMove final
explicit FOptiMove (int = 0); explicit FOptiMove (int = 0);
// Destructor // Destructor
virtual ~FOptiMove(); ~FOptiMove();
// Accessors // Accessors
const FString getClassName() const; const FString getClassName() const;

View File

@ -58,13 +58,13 @@ class FStartOptions final
FStartOptions (const FStartOptions&) = delete; FStartOptions (const FStartOptions&) = delete;
// Destructor // Destructor
virtual ~FStartOptions(); ~FStartOptions();
// Disable assignment operator (=) // Disable assignment operator (=)
FStartOptions& operator = (const FStartOptions&) = delete; FStartOptions& operator = (const FStartOptions&) = delete;
// Accessors // Accessors
virtual const FString getClassName(); const FString getClassName();
static FStartOptions& getFStartOptions(); static FStartOptions& getFStartOptions();
// Mutator // Mutator

View File

@ -167,13 +167,13 @@ class FTerm final
FTerm (const FTerm&) = delete; FTerm (const FTerm&) = delete;
// Destructor // Destructor
virtual ~FTerm(); ~FTerm();
// Disable assignment operator (=) // Disable assignment operator (=)
FTerm& operator = (const FTerm&) = delete; FTerm& operator = (const FTerm&) = delete;
// Accessors // Accessors
virtual const FString getClassName() const; const FString getClassName() const;
static std::size_t getLineNumber(); static std::size_t getLineNumber();
static std::size_t getColumnNumber(); static std::size_t getColumnNumber();
static const FString getKeyName (FKey); static const FString getKeyName (FKey);

View File

@ -87,7 +87,7 @@ class FTermcap final
FTermcap() = default; FTermcap() = default;
// Destructor // Destructor
virtual ~FTermcap() = default; ~FTermcap() = default;
// Accessors // Accessors
const FString getClassName() const; const FString getClassName() const;

View File

@ -53,10 +53,10 @@ class FTermcapQuirks final
FTermcapQuirks(); FTermcapQuirks();
// Destructor // Destructor
virtual ~FTermcapQuirks(); ~FTermcapQuirks();
// Accessor // Accessor
virtual const FString getClassName() const; const FString getClassName() const;
// Methods // Methods
static void terminalFixup(); static void terminalFixup();

View File

@ -82,7 +82,7 @@ class FTermDetection final
FTermDetection(); FTermDetection();
// Destructor // Destructor
virtual ~FTermDetection(); ~FTermDetection();
// Accessor // Accessor
const FString getClassName() const; const FString getClassName() const;

View File

@ -89,7 +89,7 @@ class FTermFreeBSD final
FTermFreeBSD (const FTermFreeBSD&) = delete; FTermFreeBSD (const FTermFreeBSD&) = delete;
// Destructor // Destructor
virtual ~FTermFreeBSD() = default; ~FTermFreeBSD() = default;
// Disable assignment operator (=) // Disable assignment operator (=)
FTermFreeBSD& operator = (const FTermFreeBSD&) = delete; FTermFreeBSD& operator = (const FTermFreeBSD&) = delete;

View File

@ -55,7 +55,7 @@ class FTermios final
FTermios(); FTermios();
// Destructor // Destructor
virtual ~FTermios(); ~FTermios();
// Accessors // Accessors
const FString getClassName() const; const FString getClassName() const;

View File

@ -87,7 +87,7 @@ class FTermLinux final
FTermLinux (const FTermLinux&) = delete; FTermLinux (const FTermLinux&) = delete;
// Destructor // Destructor
virtual ~FTermLinux(); ~FTermLinux();
// Disable assignment operator (=) // Disable assignment operator (=)
FTermLinux& operator = (const FTermLinux&) = delete; FTermLinux& operator = (const FTermLinux&) = delete;

View File

@ -81,7 +81,7 @@ class FTermOpenBSD final
FTermOpenBSD (const FTermOpenBSD&) = delete; FTermOpenBSD (const FTermOpenBSD&) = delete;
// Destructor // Destructor
virtual ~FTermOpenBSD(); ~FTermOpenBSD();
// Disable assignment operator (=) // Disable assignment operator (=)
FTermOpenBSD& operator = (const FTermOpenBSD&) = delete; FTermOpenBSD& operator = (const FTermOpenBSD&) = delete;

View File

@ -57,7 +57,7 @@ class FTermXTerminal final
FTermXTerminal (const FTermXTerminal&) = delete; FTermXTerminal (const FTermXTerminal&) = delete;
// Destructor // Destructor
virtual ~FTermXTerminal(); ~FTermXTerminal();
// Disable assignment operator (=) // Disable assignment operator (=)
FTermXTerminal& operator = (const FTermXTerminal&) = delete; FTermXTerminal& operator = (const FTermXTerminal&) = delete;

View File

@ -57,7 +57,7 @@ class SGRoptimizer final
explicit SGRoptimizer (attributebuffer&); explicit SGRoptimizer (attributebuffer&);
// Destructor // Destructor
virtual ~SGRoptimizer(); ~SGRoptimizer();
// Disable copy constructor // Disable copy constructor
SGRoptimizer (const SGRoptimizer&) = delete; SGRoptimizer (const SGRoptimizer&) = delete;