Use nullptr instead of 0 to initialize a pointer values

This commit is contained in:
Markus Gans 2018-12-10 01:48:26 +01:00
parent fe0c22abe4
commit 6ce8c5cb27
85 changed files with 384 additions and 402 deletions

View File

@ -1,6 +1,7 @@
2018-12-09 Markus Gans <guru.mail@muenster.de>
* Better handling of the scrollbar maximum
* Deactivate copy constructor and assignment operator with "= delete"
* Use nullptr instead of 0 to initialize a pointer values
2018-12-06 Markus Gans <guru.mail@muenster.de>
* Easier handling of fc::SpecialCharacter

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

@ -43,7 +43,7 @@ class Button : public finalcut::FButton
{
public:
// Constructor
explicit Button (FWidget* = 0);
explicit Button (FWidget* = nullptr);
// Method
void setChecked(bool);
@ -111,7 +111,7 @@ class Calc : public finalcut::FDialog
{
public:
// Constructor
explicit Calc (finalcut::FWidget* parent = 0);
explicit Calc (finalcut::FWidget* parent = nullptr);
// Destructor
~Calc();

View File

@ -39,7 +39,7 @@ class CheckList : public finalcut::FDialog
{
public:
// Constructor
explicit CheckList (finalcut::FWidget* = 0);
explicit CheckList (finalcut::FWidget* = nullptr);
// Disable copy constructor
CheckList (const CheckList&) = delete;
// Destructor

View File

@ -30,7 +30,7 @@ class Keyboard : public finalcut::FWidget
{
public:
// Constructor
explicit Keyboard (finalcut::FWidget* = 0);
explicit Keyboard (finalcut::FWidget* = nullptr);
protected:
// Event handlers

View File

@ -29,7 +29,7 @@
// Global application object
static finalcut::FString* temp_str = 0;
static finalcut::FString* temp_str = nullptr;
// Function prototypes
@ -77,7 +77,7 @@ class Listbox : public finalcut::FDialog
{
public:
// Constructor
explicit Listbox (FWidget* = 0);
explicit Listbox (FWidget* = nullptr);
// Disable copy constructor
Listbox (const Listbox&) = delete;
// Destructor

View File

@ -39,7 +39,7 @@ class Listview : public finalcut::FDialog
{
public:
// Constructor
explicit Listview (finalcut::FWidget* = 0);
explicit Listview (finalcut::FWidget* = nullptr);
// Disable copy constructor
Listview (const Listview&) = delete;
// Destructor

View File

@ -34,7 +34,7 @@ class Mandelbrot : public finalcut::FDialog
{
public:
// Constructor
explicit Mandelbrot (finalcut::FWidget* = 0);
explicit Mandelbrot (finalcut::FWidget* = nullptr);
// Destructor
~Mandelbrot();

View File

@ -34,7 +34,7 @@ class Menu : public finalcut::FDialog
{
public:
// Constructor
explicit Menu (finalcut::FWidget* = 0);
explicit Menu (finalcut::FWidget* = nullptr);
// Disable copy constructor
Menu (const Menu&) = delete;
// Destructor

View File

@ -34,7 +34,7 @@ class ColorChooser : public finalcut::FWidget
{
public:
// Constructor
explicit ColorChooser (finalcut::FWidget* = 0);
explicit ColorChooser (finalcut::FWidget* = nullptr);
// Disable copy constructor
ColorChooser (const ColorChooser&) = delete;
// Destructor
@ -170,7 +170,7 @@ class Brushes : public finalcut::FWidget
{
public:
// Constructor
explicit Brushes (finalcut::FWidget* = 0);
explicit Brushes (finalcut::FWidget* = nullptr);
// Disable copy constructor
Brushes (const Brushes&) = delete;
// Destructor
@ -308,7 +308,7 @@ class MouseDraw : public finalcut::FDialog
using FWidget::setGeometry;
// Constructor
explicit MouseDraw (finalcut::FWidget* = 0);
explicit MouseDraw (finalcut::FWidget* = nullptr);
// Disable copy constructor
MouseDraw (const MouseDraw&) = delete;
// Destructor
@ -339,7 +339,7 @@ class MouseDraw : public finalcut::FDialog
void cb_colorChanged (finalcut::FWidget*, data_ptr);
// Data Members
term_area* canvas{0};
term_area* canvas{nullptr};
ColorChooser c_chooser{this};
Brushes brush{this};
};

View File

@ -30,7 +30,7 @@
static finalcut::FVTerm* terminal;
// Global FApplication object
static finalcut::FApplication* app;
static finalcut::FApplication* app = nullptr;
// function prototype
bool keyPressed();
@ -201,5 +201,5 @@ int main (int argc, char* argv[])
// Waiting for keypress
keyPressed();
app = 0; // End of TermApp object scope
app = nullptr; // End of TermApp object scope
}

View File

@ -34,7 +34,7 @@ class Scrollview : public finalcut::FScrollView
{
public:
// Constructor
explicit Scrollview (finalcut::FWidget* = 0);
explicit Scrollview (finalcut::FWidget* = nullptr);
// Disable copy constructor
Scrollview (const Scrollview&) = delete;
// Destructor
@ -189,7 +189,7 @@ class Scrollviewdemo : public finalcut::FDialog
{
public:
// Constructor
explicit Scrollviewdemo (finalcut::FWidget* = 0);
explicit Scrollviewdemo (finalcut::FWidget* = nullptr);
// Destructor
~Scrollviewdemo();
@ -198,7 +198,7 @@ class Scrollviewdemo : public finalcut::FDialog
virtual void onClose (finalcut::FCloseEvent*);
// Callback method
void cb_quit (finalcut::FWidget* = 0, data_ptr = 0);
void cb_quit (finalcut::FWidget* = nullptr, data_ptr = nullptr);
// Data Members
Scrollview sview{this};

View File

@ -187,7 +187,7 @@ void streamingFromFStringExample()
std::wcout << "stream out: " << stream_wstring << std::endl;
// ...to wide character
wchar_t stream_wchar_t = 0;
wchar_t stream_wchar_t = L'\0';
finalcut::FString("w") >> stream_wchar_t;
std::wcout << "stream out: " << stream_wchar_t << std::endl;

View File

@ -34,7 +34,7 @@ class AttribDlg : public finalcut::FDialog
{
public:
// Constructor
explicit AttribDlg (finalcut::FWidget* = 0);
explicit AttribDlg (finalcut::FWidget* = nullptr);
// Disable copy constructor
AttribDlg (const AttribDlg&) = delete;
// Destructor
@ -49,8 +49,8 @@ class AttribDlg : public finalcut::FDialog
virtual void onClose (finalcut::FCloseEvent*);
// Callback methods
void cb_next (finalcut::FWidget* = 0, data_ptr = 0);
void cb_back (finalcut::FWidget* = 0, data_ptr = 0);
void cb_next (finalcut::FWidget* = nullptr, data_ptr = nullptr);
void cb_back (finalcut::FWidget* = nullptr, data_ptr = nullptr);
// Data Members
FColor bgcolor;
@ -185,7 +185,7 @@ class AttribDemo : public finalcut::FWidget
{
public:
// Constructor
explicit AttribDemo (FWidget* = 0);
explicit AttribDemo (FWidget* = nullptr);
// Destructor
~AttribDemo()

View File

@ -313,7 +313,7 @@ int main (int argc, char* argv[])
// Pointer to the global virtual terminal object
terminal = static_cast<finalcut::FVTerm*>(&TermApp);
finalcut::FTermcap::tcap_map* tcap = 0;
finalcut::FTermcap::tcap_map* tcap = nullptr;
tcap = finalcut::FTermcap::getTermcapMap();
std::cout << "--------\r\nFTermcap\r\n--------\r\n\n";

View File

@ -31,7 +31,7 @@ class Timer : public finalcut::FWidget
{
public:
// Constructor
explicit Timer (finalcut::FWidget* = 0);
explicit Timer (finalcut::FWidget* = nullptr);
protected:
// Method

View File

@ -42,7 +42,8 @@ class Transparent : public finalcut::FDialog
} trans_type;
// Constructor
explicit Transparent (finalcut::FWidget* = 0, trans_type = transparent);
explicit Transparent ( finalcut::FWidget* = nullptr
, trans_type = transparent );
// Disable copy constructor
Transparent (const Transparent&) = delete;
// Destructor
@ -149,7 +150,7 @@ class MainWindow : public finalcut::FDialog
{
public:
// Constructor
explicit MainWindow (finalcut::FWidget* = 0);
explicit MainWindow (finalcut::FWidget* = nullptr);
// Disable copy constructor
MainWindow (const MainWindow&) = delete;
// Destructor
@ -183,9 +184,9 @@ class MainWindow : public finalcut::FDialog
// Data Members
finalcut::FString line1{};
finalcut::FString line2{};
Transparent* transpwin{0};
Transparent* shadowwin{0};
Transparent* ibg{0};
Transparent* transpwin{nullptr};
Transparent* shadowwin{nullptr};
Transparent* ibg{nullptr};
finalcut::FStatusBar status_bar{this};
};
#pragma pack(pop)

View File

@ -114,7 +114,7 @@ class Treeview : public finalcut::FDialog
{
public:
// Constructor
explicit Treeview (finalcut::FWidget* = 0);
explicit Treeview (finalcut::FWidget* = nullptr);
// Disable copy constructor
Treeview (const Treeview&) = delete;
// Destructor

View File

@ -38,7 +38,7 @@ class ProgressDialog : public finalcut::FDialog
{
public:
// Constructor
explicit ProgressDialog (finalcut::FWidget* = 0);
explicit ProgressDialog (finalcut::FWidget* = nullptr);
// Disable copy constructor
ProgressDialog (const ProgressDialog&) = delete;
// Destructor
@ -181,7 +181,7 @@ class TextWindow : public finalcut::FDialog
{
public:
// Constructor
explicit TextWindow (finalcut::FWidget* = 0);
explicit TextWindow (finalcut::FWidget* = nullptr);
// Disable copy constructor
TextWindow (const TextWindow&) = delete;
// Destructor
@ -249,7 +249,7 @@ class MyDialog : public finalcut::FDialog
{
public:
// Constructor
explicit MyDialog (finalcut::FWidget* = 0);
explicit MyDialog (finalcut::FWidget* = nullptr);
// Disable copy constructor
MyDialog (const MyDialog&) = delete;
// Destructor

View File

@ -35,7 +35,7 @@ class Watch : public finalcut::FDialog
{
public:
// Constructor
explicit Watch (finalcut::FWidget* = 0);
explicit Watch (finalcut::FWidget* = nullptr);
// Disable copy constructor
Watch (const Watch&) = delete;
// Destructor

View File

@ -35,7 +35,7 @@ class SmallWindow : public finalcut::FDialog
{
public:
// Constructor
explicit SmallWindow (finalcut::FWidget* = 0);
explicit SmallWindow (finalcut::FWidget* = nullptr);
// Disable copy constructor
SmallWindow (const SmallWindow&) = delete;
// Destructor
@ -164,7 +164,7 @@ class Window : public finalcut::FDialog
{
public:
// Constructor
explicit Window (finalcut::FWidget* = 0);
explicit Window (finalcut::FWidget* = nullptr);
// Disable copy constructor
Window (const Window&) = delete;
// Destructor
@ -181,11 +181,7 @@ class Window : public finalcut::FDialog
struct win_data
{
// Constructor
win_data()
: is_open(false)
, title()
, dgl(0)
{ }
win_data() = default;
// Disable copy constructor
win_data (const win_data&) = delete;
@ -193,9 +189,9 @@ class Window : public finalcut::FDialog
win_data& operator = (const win_data&) = delete;
// Data Members
bool is_open;
finalcut::FString title;
SmallWindow* dgl;
bool is_open{false};
finalcut::FString title{};
SmallWindow* dgl{nullptr};
};
// Method
@ -552,7 +548,7 @@ void Window::cb_destroyWindow (finalcut::FWidget*, data_ptr data)
if ( win_dat )
{
win_dat->is_open = false;
win_dat->dgl = 0;
win_dat->dgl = nullptr;
}
}

View File

@ -149,7 +149,7 @@ all: dep $(OBJS)
$(LIB): all
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

@ -32,26 +32,26 @@ namespace finalcut
{
// Global application object
static FApplication* app_object = 0;
static FApplication* app_object = nullptr;
// Flag to exit the local event loop
static bool app_exit_loop = false;
// Static attributes
FWidget* FWidget::main_widget = 0; // main application widget
FWidget* FWidget::active_window = 0; // the active window
FWidget* FWidget::focus_widget = 0; // has keyboard input focus
FWidget* FWidget::clicked_widget = 0; // is focused by click
FWidget* FWidget::open_menu = 0; // currently open menu
FWidget* FWidget::move_size_widget = 0; // move/size by keyboard
FWidget* FApplication::keyboard_widget = 0; // has the keyboard focus
FKeyboard* FApplication::keyboard = 0; // keyboard access
FMouseControl* FApplication::mouse = 0; // mouse control
FWidget* FWidget::main_widget = nullptr; // main application widget
FWidget* FWidget::active_window = nullptr; // the active window
FWidget* FWidget::focus_widget = nullptr; // has keyboard input focus
FWidget* FWidget::clicked_widget = nullptr; // is focused by click
FWidget* FWidget::open_menu = nullptr; // currently open menu
FWidget* FWidget::move_size_widget = nullptr; // move/size by keyboard
FWidget* FApplication::keyboard_widget = nullptr; // has the keyboard focus
FKeyboard* FApplication::keyboard = nullptr; // keyboard access
FMouseControl* FApplication::mouse = nullptr; // mouse control
int FApplication::loop_level = 0; // event loop level
int FApplication::quit_code = 0;
bool FApplication::quit_now = false;
FApplication::eventQueue* FApplication::event_queue = 0;
FApplication::eventQueue* FApplication::event_queue = nullptr;
//----------------------------------------------------------------------
@ -87,7 +87,7 @@ FApplication::~FApplication() // destructor
if ( event_queue )
delete event_queue;
app_object = 0;
app_object = nullptr;
}
@ -498,7 +498,7 @@ inline void FApplication::findKeyboardWidget()
{
// Find the widget that has the keyboard focus
FWidget* widget = 0;
FWidget* widget = nullptr;
FWidget* focus = getFocusWidget();
FWidget* move_size = getMoveSizeWidget();

View File

@ -618,7 +618,7 @@ inline void FButton::drawButtonTextLine (wchar_t button_text[])
else
center_offset = (getWidth() - txtlength - 1) / 2;
// Print button text line --------
// Print button text line
for (pos = 0; pos < center_offset; pos++)
print (space_char); // █

View File

@ -53,9 +53,9 @@ FDialog::~FDialog() // destructor
FApplication* fapp = static_cast<FApplication*>(getRootWidget());
bool is_quit = fapp->isQuit();
delete dialog_menu;
dgl_menuitem = 0;
dgl_menuitem = nullptr;
delete accelerator_list;
accelerator_list = 0;
accelerator_list = nullptr;
if ( ! is_quit )
switchToPrevWindow(this);
@ -779,7 +779,7 @@ void FDialog::draw()
if ( tooltip && ! getMoveSizeWidget() )
{
delete tooltip;
tooltip = 0;
tooltip = nullptr;
}
// Fill the background
@ -1623,7 +1623,7 @@ inline void FDialog::acceptMoveSize()
if ( tooltip )
delete tooltip;
tooltip = 0;
tooltip = nullptr;
redraw();
}
@ -1635,7 +1635,7 @@ inline void FDialog::cancelMoveSize()
if ( tooltip )
delete tooltip;
tooltip = 0;
tooltip = nullptr;
setPos (save_geometry.getPos());
if ( isResizeable() )

View File

@ -34,7 +34,7 @@ long FKeyboard::key_timeout = 100000; // 100 ms (default timeout for keypress)
struct timeval FKeyboard::time_keypressed{};
#if defined(__linux__)
FTermLinux* FKeyboard::linux = 0;
FTermLinux* FKeyboard::linux = nullptr;
#endif
//----------------------------------------------------------------------

View File

@ -348,7 +348,7 @@ void FLabel::onAccel (FAccelEvent* ev)
//----------------------------------------------------------------------
void FLabel::cb_accel_widget_destroyed (FWidget*, data_ptr)
{
accel_widget = 0;
accel_widget = nullptr;
delAccelerator();
}

View File

@ -1128,7 +1128,7 @@ void FListView::onMouseUp (FMouseEvent* ev)
clicked_expander_pos.setPoint(-1, -1);
clicked_header_pos.setPoint(-1, -1);
clicked_checkbox_item = 0;
clicked_checkbox_item = nullptr;
}
//----------------------------------------------------------------------

View File

@ -183,7 +183,7 @@ void FMenu::onKeyPress (FKeyEvent* ev)
//----------------------------------------------------------------------
void FMenu::onMouseDown (FMouseEvent* ev)
{
shown_sub_menu = 0;
shown_sub_menu = nullptr;
if ( ev->getButton() != fc::LeftButton )
{
@ -269,7 +269,7 @@ void FMenu::onMouseMove (FMouseEvent* ev)
isMouseOverMenuBar (ev->getTermPos())
};
shown_sub_menu = 0;
shown_sub_menu = nullptr;
// Mouse pointer over an entry in the menu list
mouseMoveOverList (ev->getPos(), ms);
@ -611,7 +611,7 @@ void FMenu::closeOpenedSubMenu()
opened_sub_menu->hideSubMenus();
opened_sub_menu->hide();
opened_sub_menu = 0;
opened_sub_menu = nullptr;
}
//----------------------------------------------------------------------
@ -622,7 +622,7 @@ void FMenu::hideSubMenus()
{
opened_sub_menu->hideSubMenus();
opened_sub_menu->hide();
opened_sub_menu = 0;
opened_sub_menu = nullptr;
}
unselectItem();

View File

@ -459,7 +459,7 @@ void FMenuItem::onAccel (FAccelEvent* ev)
else
{
unsetSelected();
mbar->selected_item = 0;
mbar->selected_item = nullptr;
mbar->redraw();
processClicked();
mbar->drop_down = false;
@ -536,7 +536,7 @@ FMenuList* FMenuItem::getFMenuList (FWidget& widget)
menu_list = static_cast<FMenuList*>(Menubar);
}
else
menu_list = 0;
menu_list = nullptr;
return menu_list;
}
@ -751,7 +751,7 @@ void FMenuItem::cb_destroyDialog (FWidget* widget, data_ptr)
{
delAccelerator(win);
delCallback(win);
associated_window = 0;
associated_window = nullptr;
}
}

View File

@ -27,8 +27,8 @@ namespace finalcut
// static class attributes
bool FObject::timer_modify_lock;
FObject::TimerList* FObject::timer_list = 0;
const FString* fc::emptyFString::empty_string = 0;
FObject::TimerList* FObject::timer_list = nullptr;
const FString* fc::emptyFString::empty_string = nullptr;
//----------------------------------------------------------------------
// class FObject
@ -71,7 +71,7 @@ FObject::~FObject() // destructor
if ( ! has_parent && timer_list )
{
delete timer_list;
timer_list = 0;
timer_list = nullptr;
}
if ( ! has_parent && ! fc::emptyFString::isNull() )
@ -80,22 +80,16 @@ FObject::~FObject() // destructor
// Delete children objects
if ( hasChildren() )
{
constFObjectIterator iter, last;
FObjectList delete_list = children_list;
iter = delete_list.begin();
last = delete_list.end();
auto delete_list = children_list;
while ( iter != last )
{
delete *iter;
++iter;
}
for (auto&& obj : delete_list)
delete obj;
}
if ( parent_obj )
parent_obj->delChild(this);
parent_obj = 0;
parent_obj = nullptr;
}
// public methods of FObject
@ -110,8 +104,7 @@ FObject* FObject::getChild (int index) const
if ( index <= 0 || index > numOfChildren() )
return 0;
constFObjectIterator iter;
iter = begin();
auto iter = begin();
std::advance (iter, index - 1);
return *iter;
}
@ -121,7 +114,7 @@ bool FObject::isChild (FObject* obj) const
{
// Find out if obj is a child object of mine
FObject* p_obj = 0;
FObject* p_obj = nullptr;
while ( obj && (p_obj = obj->getParent()) )
{
@ -169,7 +162,7 @@ void FObject::delChild (FObject* obj)
if ( hasChildren() )
{
obj->parent_obj = 0;
obj->parent_obj = nullptr;
obj->has_parent = false;
children_list.remove(obj);
}
@ -233,7 +226,6 @@ int FObject::addTimer (int interval)
// Create a timer and returns the timer identifier number
// (interval in ms)
FObject::TimerList::iterator iter, last;
timeval time_interval;
timeval currentTime;
int id = 1;
@ -242,8 +234,8 @@ int FObject::addTimer (int interval)
// find an unused timer id
if ( ! timer_list->empty() )
{
iter = timer_list->begin();
last = timer_list->end();
auto iter = timer_list->begin();
auto last = timer_list->end();
while ( iter != last )
{
@ -267,8 +259,8 @@ int FObject::addTimer (int interval)
timer_data t = { id, time_interval, timeout, this };
// insert in list sorted by timeout
iter = timer_list->begin();
last = timer_list->end();
auto iter = timer_list->begin();
auto last = timer_list->end();
while ( iter != last && iter->timeout < t.timeout )
++iter;
@ -284,14 +276,12 @@ bool FObject::delTimer (int id)
{
// Deletes a timer by using the timer identifier number
FObject::TimerList::iterator iter, last;
if ( id <= 0 )
return false;
timer_modify_lock = true;
iter = timer_list->begin();
last = timer_list->end();
auto iter = timer_list->begin();
auto last = timer_list->end();
while ( iter != last && iter->id != id )
++iter;
@ -312,8 +302,6 @@ bool FObject::delOwnTimer()
{
// Deletes all timers of this object
FObject::TimerList::iterator iter;
if ( ! timer_list )
return false;
@ -321,7 +309,7 @@ bool FObject::delOwnTimer()
return false;
timer_modify_lock = true;
iter = timer_list->begin();
auto iter = timer_list->begin();
while ( iter != timer_list->end() )
{
@ -375,7 +363,6 @@ void FObject::onTimer (FTimerEvent*)
//----------------------------------------------------------------------
uInt FObject::processTimerEvent()
{
FObject::TimerList::iterator iter, last;
timeval currentTime;
uInt activated = 0;
@ -390,27 +377,23 @@ uInt FObject::processTimerEvent()
if ( timer_list->empty() )
return 0;
iter = timer_list->begin();
last = timer_list->end();
while ( iter != last )
for (auto&& timer : *timer_list)
{
if ( ! iter->id
|| ! iter->object
|| currentTime < iter->timeout ) // no timer expired
if ( ! timer.id
|| ! timer.object
|| currentTime < timer.timeout ) // no timer expired
break;
iter->timeout += iter->interval;
timer.timeout += timer.interval;
if ( iter->timeout < currentTime )
iter->timeout = currentTime + iter->interval;
if ( timer.timeout < currentTime )
timer.timeout = currentTime + timer.interval;
if ( iter->interval.tv_usec > 0 || iter->interval.tv_sec > 0 )
if ( timer.interval.tv_usec > 0 || timer.interval.tv_sec > 0 )
activated++;
FTimerEvent t_ev(fc::Timer_Event, iter->id);
performTimerAction (iter->object, &t_ev);
++iter;
FTimerEvent t_ev(fc::Timer_Event, timer.id);
performTimerAction (timer.object, &t_ev);
}
return activated;

View File

@ -121,7 +121,7 @@ void FOptiMove::set_cursor_home (char cap[])
}
else
{
F_cursor_home.cap = 0;
F_cursor_home.cap = nullptr;
F_cursor_home.duration = \
F_cursor_home.length = LONG_DURATION;
}
@ -138,7 +138,7 @@ void FOptiMove::set_cursor_to_ll (char cap[])
}
else
{
F_cursor_to_ll.cap = 0;
F_cursor_to_ll.cap = nullptr;
F_cursor_to_ll.duration = \
F_cursor_to_ll.length = LONG_DURATION;
}
@ -155,7 +155,7 @@ void FOptiMove::set_carriage_return (char cap[])
}
else
{
F_carriage_return.cap = 0;
F_carriage_return.cap = nullptr;
F_carriage_return.duration = \
F_carriage_return.length = LONG_DURATION;
}
@ -172,7 +172,7 @@ void FOptiMove::set_tabular (char cap[])
}
else
{
F_tab.cap = 0;
F_tab.cap = nullptr;
F_tab.duration = \
F_tab.length = LONG_DURATION;
}
@ -189,7 +189,7 @@ void FOptiMove::set_back_tab (char cap[])
}
else
{
F_back_tab.cap = 0;
F_back_tab.cap = nullptr;
F_back_tab.duration = \
F_back_tab.length = LONG_DURATION;
}
@ -206,7 +206,7 @@ void FOptiMove::set_cursor_up (char cap[])
}
else
{
F_cursor_up.cap = 0;
F_cursor_up.cap = nullptr;
F_cursor_up.duration = \
F_cursor_up.length = LONG_DURATION;
}
@ -223,7 +223,7 @@ void FOptiMove::set_cursor_down (char cap[])
}
else
{
F_cursor_down.cap = 0;
F_cursor_down.cap = nullptr;
F_cursor_down.duration = \
F_cursor_down.length = LONG_DURATION;
}
@ -240,7 +240,7 @@ void FOptiMove::set_cursor_left (char cap[])
}
else
{
F_cursor_left.cap = 0;
F_cursor_left.cap = nullptr;
F_cursor_left.duration = \
F_cursor_left.length = LONG_DURATION;
}
@ -257,7 +257,7 @@ void FOptiMove::set_cursor_right (char cap[])
}
else
{
F_cursor_right.cap = 0;
F_cursor_right.cap = nullptr;
F_cursor_right.duration = \
F_cursor_right.length = LONG_DURATION;
}
@ -275,7 +275,7 @@ void FOptiMove::set_cursor_address (char cap[])
}
else
{
F_cursor_address.cap = 0;
F_cursor_address.cap = nullptr;
F_cursor_address.duration = \
F_cursor_address.length = LONG_DURATION;
}
@ -293,7 +293,7 @@ void FOptiMove::set_column_address (char cap[])
}
else
{
F_column_address.cap = 0;
F_column_address.cap = nullptr;
F_column_address.duration = \
F_column_address.length = LONG_DURATION;
}
@ -311,7 +311,7 @@ void FOptiMove::set_row_address (char cap[])
}
else
{
F_row_address.cap = 0;
F_row_address.cap = nullptr;
F_row_address.duration = \
F_row_address.length = LONG_DURATION;
}
@ -329,7 +329,7 @@ void FOptiMove::set_parm_up_cursor (char cap[])
}
else
{
F_parm_up_cursor.cap = 0;
F_parm_up_cursor.cap = nullptr;
F_parm_up_cursor.duration = \
F_parm_up_cursor.length = LONG_DURATION;
}
@ -347,7 +347,7 @@ void FOptiMove::set_parm_down_cursor (char cap[])
}
else
{
F_parm_down_cursor.cap = 0;
F_parm_down_cursor.cap = nullptr;
F_parm_down_cursor.duration = \
F_parm_down_cursor.length = LONG_DURATION;
}
@ -365,7 +365,7 @@ void FOptiMove::set_parm_left_cursor (char cap[])
}
else
{
F_parm_left_cursor.cap = 0;
F_parm_left_cursor.cap = nullptr;
F_parm_left_cursor.duration = \
F_parm_left_cursor.length = LONG_DURATION;
}
@ -383,7 +383,7 @@ void FOptiMove::set_parm_right_cursor (char cap[])
}
else
{
F_parm_right_cursor.cap = 0;
F_parm_right_cursor.cap = nullptr;
F_parm_right_cursor.duration = \
F_parm_right_cursor.length = LONG_DURATION;
}
@ -401,7 +401,7 @@ void FOptiMove::set_erase_chars (char cap[])
}
else
{
F_erase_chars.cap = 0;
F_erase_chars.cap = nullptr;
F_erase_chars.duration = \
F_erase_chars.length = LONG_DURATION;
}
@ -419,7 +419,7 @@ void FOptiMove::set_repeat_char (char cap[])
}
else
{
F_repeat_char.cap = 0;
F_repeat_char.cap = nullptr;
F_repeat_char.duration = \
F_repeat_char.length = LONG_DURATION;
}
@ -436,7 +436,7 @@ void FOptiMove::set_clr_bol (char cap[])
}
else
{
F_clr_bol.cap = 0;
F_clr_bol.cap = nullptr;
F_clr_bol.duration = \
F_clr_bol.length = LONG_DURATION;
}
@ -453,7 +453,7 @@ void FOptiMove::set_clr_eol (char cap[])
}
else
{
F_clr_eol.cap = 0;
F_clr_eol.cap = nullptr;
F_clr_eol.duration = \
F_clr_eol.length = LONG_DURATION;
}

View File

@ -45,7 +45,7 @@ FScrollView::~FScrollView() // destructor
delete vbar;
delete hbar;
removeArea (viewport);
child_print_area = viewport = 0;
child_print_area = viewport = nullptr;
}
@ -600,7 +600,7 @@ FVTerm::term_area* FScrollView::getPrintArea()
if ( use_own_print_area || ! viewport )
{
child_print_area = 0;
child_print_area = nullptr;
term_area* area = FWidget::getPrintArea();
child_print_area = viewport;
return area;
@ -984,7 +984,7 @@ void FScrollView::cb_HBarChange (FWidget*, data_ptr)
//----------------------------------------------------------------------
inline void FScrollView::redrawHBar()
{
child_print_area = 0;
child_print_area = nullptr;
if ( hbar->isVisible() )
hbar->redraw();
@ -995,7 +995,7 @@ inline void FScrollView::redrawHBar()
//----------------------------------------------------------------------
inline void FScrollView::redrawVBar()
{
child_print_area = 0;
child_print_area = nullptr;
if ( vbar->isVisible() )
vbar->redraw();
@ -1006,7 +1006,7 @@ inline void FScrollView::redrawVBar()
//----------------------------------------------------------------------
inline void FScrollView::drawHBar()
{
child_print_area = 0;
child_print_area = nullptr;
if ( hbar->isVisible() )
hbar->drawBar();
@ -1017,7 +1017,7 @@ inline void FScrollView::drawHBar()
//----------------------------------------------------------------------
inline void FScrollView::drawVBar()
{
child_print_area = 0;
child_print_area = nullptr;
if ( vbar->isVisible() )
vbar->drawBar();

View File

@ -448,7 +448,7 @@ FString FString::clear()
length = 0;
bufsize = 0;
string = 0;
string = nullptr;
return *this;
}
@ -876,7 +876,7 @@ FStringList FString::split (const FString& delimiter)
if ( ! (string && *string) )
return string_list;
rest = 0;
rest = nullptr;
token = extractToken(&rest, s.string, delimiter.wc_str());
while ( token )
@ -1628,7 +1628,7 @@ inline char* FString::wc_to_c_str (const wchar_t s[]) const
if ( mblength == -1 && errno != EILSEQ )
{
delete[](c_string);
c_string = 0;
c_string = nullptr;
return const_cast<char*>("");
}

View File

@ -32,7 +32,7 @@ namespace finalcut
{
// global FTerm object
static FTerm* init_term_object = 0;
static FTerm* init_term_object = nullptr;
// global init state
static bool term_initialized = false;
@ -42,25 +42,25 @@ int (*FTerm::Fputchar)(int);
// static class attributes
FTerm::initializationValues FTerm::init_values;
FTermData* FTerm::data = 0;
FTermcap::tcap_map* FTerm::tcap = 0;
FOptiMove* FTerm::opti_move = 0;
FOptiAttr* FTerm::opti_attr = 0;
FTermDetection* FTerm::term_detection = 0;
FTermXTerminal* FTerm::xterm = 0;
FKeyboard* FTerm::keyboard = 0;
FMouseControl* FTerm::mouse = 0;
FTermData* FTerm::data = nullptr;
FTermcap::tcap_map* FTerm::tcap = nullptr;
FOptiMove* FTerm::opti_move = nullptr;
FOptiAttr* FTerm::opti_attr = nullptr;
FTermDetection* FTerm::term_detection = nullptr;
FTermXTerminal* FTerm::xterm = nullptr;
FKeyboard* FTerm::keyboard = nullptr;
FMouseControl* FTerm::mouse = nullptr;
#if defined(__linux__)
FTermLinux* FTerm::linux = 0;
FTermLinux* FTerm::linux = nullptr;
#elif defined(__FreeBSD__) || defined(__DragonFly__)
FTermFreeBSD* FTerm::freebsd = 0;
FTermFreeBSD* FTerm::freebsd = nullptr;
#elif defined(__NetBSD__) || defined(__OpenBSD__)
FTermOpenBSD* FTerm::openbsd = 0;
FTermOpenBSD* FTerm::openbsd = nullptr;
#endif
#if DEBUG
FTermDebugData* FTerm::debug_data = 0;
FTermDebugData* FTerm::debug_data = nullptr;
#endif
// function prototypes
@ -384,7 +384,7 @@ char* FTerm::cursorsVisibility (bool on)
{
// Hides or shows the input cursor on the terminal
char* visibility_str = 0;
char* visibility_str = nullptr;
if ( on == data->isCursorHidden() )
return 0;
@ -665,7 +665,7 @@ void FTerm::setEncoding (fc::encoding enc)
{
if ( enc == fc::VT100 || enc == fc::PC )
{
char* empty = 0;
char* empty = nullptr;
opti_move->set_tabular (empty);
}
else
@ -1407,7 +1407,7 @@ void FTerm::init_tab_quirks()
if ( enc == fc::VT100 || enc == fc::PC )
{
char* empty = 0;
char* empty = nullptr;
opti_move->set_tabular (empty);
}
}

View File

@ -40,8 +40,8 @@ bool FTermcap::no_utf8_acs_chars = false;
int FTermcap::max_color = 1;
int FTermcap::tabstop = 8;
int FTermcap::attr_without_color = 0;
FTermData* FTermcap::fterm_data = 0;
FTermDetection* FTermcap::term_detection = 0;
FTermData* FTermcap::fterm_data = nullptr;
FTermDetection* FTermcap::term_detection = nullptr;
//----------------------------------------------------------------------

View File

@ -26,9 +26,9 @@ namespace finalcut
{
// static class attributes
FTermcap::tcap_map* FTermcapQuirks::tcap = 0;
FTermData* FTermcapQuirks::fterm_data = 0;
FTermDetection* FTermcapQuirks::term_detection = 0;
FTermcap::tcap_map* FTermcapQuirks::tcap = nullptr;
FTermData* FTermcapQuirks::fterm_data = nullptr;
FTermDetection* FTermcapQuirks::term_detection = nullptr;
//----------------------------------------------------------------------
@ -210,16 +210,16 @@ void FTermcapQuirks::linux()
TCAP(fc::t_exit_bold_mode) = C_STR(CSI "22m");
TCAP(fc::t_exit_blink_mode) = C_STR(CSI "25m");
TCAP(fc::t_exit_reverse_mode) = C_STR(CSI "27m");
TCAP(fc::t_exit_secure_mode) = 0;
TCAP(fc::t_exit_protected_mode) = 0;
TCAP(fc::t_exit_crossed_out_mode) = 0;
TCAP(fc::t_exit_secure_mode) = nullptr;
TCAP(fc::t_exit_protected_mode) = nullptr;
TCAP(fc::t_exit_crossed_out_mode) = nullptr;
TCAP(fc::t_orig_pair) = C_STR(CSI "39;49;25m");
// Avoid underline and dim mode
TCAP(fc::t_enter_dim_mode) = 0;
TCAP(fc::t_exit_dim_mode) = 0;
TCAP(fc::t_enter_underline_mode) = 0;
TCAP(fc::t_exit_underline_mode) = 0;
TCAP(fc::t_enter_dim_mode) = nullptr;
TCAP(fc::t_exit_dim_mode) = nullptr;
TCAP(fc::t_enter_underline_mode) = nullptr;
TCAP(fc::t_exit_underline_mode) = nullptr;
}
//----------------------------------------------------------------------

View File

@ -31,14 +31,14 @@ FTermDetection::terminalType FTermDetection::terminal_type = \
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
FTermDetection::colorEnv FTermDetection::color_env;
FTermDetection::secondaryDA FTermDetection::secondary_da;
FTermData* FTermDetection::fterm_data = 0;
FTermData* FTermDetection::fterm_data = nullptr;
char FTermDetection::termtype[256] = { };
char FTermDetection::ttytypename[256] = { };
bool FTermDetection::decscusr_support;
bool FTermDetection::terminal_detection;
bool FTermDetection::color256;
const FString* FTermDetection::answer_back = 0;
const FString* FTermDetection::sec_da = 0;
const FString* FTermDetection::answer_back = nullptr;
const FString* FTermDetection::sec_da = nullptr;
int FTermDetection::gnome_terminal_id;
#if DEBUG
@ -182,7 +182,7 @@ bool FTermDetection::getTTYtype()
{
char* name;
char* type;
type = name = 0; // 0 == not found
type = name = nullptr; // nullptr == not found
p = str;
while ( *p )
@ -311,7 +311,7 @@ void FTermDetection::detectTerminal()
{
// Terminal detection
char* new_termtype = 0;
char* new_termtype = nullptr;
if ( terminal_detection )
{
@ -359,7 +359,7 @@ void FTermDetection::detectTerminal()
//----------------------------------------------------------------------
char* FTermDetection::init_256colorTerminal()
{
char* new_termtype = 0;
char* new_termtype = nullptr;
if ( get256colorEnvString() )
color256 = true;
@ -422,7 +422,7 @@ bool FTermDetection::get256colorEnvString()
//----------------------------------------------------------------------
char* FTermDetection::termtype_256color_quirks()
{
char* new_termtype = 0;
char* new_termtype = nullptr;
if ( ! color256 )
return new_termtype;

View File

@ -44,7 +44,7 @@ namespace finalcut
bool FTermLinux::half_block_character = true;
bool FTermLinux::has_saved_palette = false;
FTermDetection* FTermLinux::term_detection = 0;
FTermDetection* FTermLinux::term_detection = nullptr;
fc::linuxConsoleCursorStyle FTermLinux::linux_console_cursor_style;
FTermLinux::ColorMap FTermLinux::saved_color_map;
FTermLinux::ColorMap FTermLinux::cmap;
@ -148,8 +148,8 @@ void FTermLinux::init()
{
// initialize Linux console
screen_unicode_map.entries = 0;
screen_font.data = 0;
screen_unicode_map.entries = nullptr;
screen_font.data = nullptr;
if ( FTerm::openConsole() == 0 )
{
@ -342,7 +342,7 @@ bool FTermLinux::loadOldFont (uInt char_map[][fc::NUM_OF_ENCODINGS])
, screen_font.height
, true );
delete[] screen_font.data;
screen_font.data = 0;
screen_font.data = nullptr;
if ( ret == 0 )
retval = true;
@ -353,7 +353,7 @@ bool FTermLinux::loadOldFont (uInt char_map[][fc::NUM_OF_ENCODINGS])
setUnicodeMap (&screen_unicode_map);
initCharMap(char_map);
delete[] screen_unicode_map.entries;
screen_unicode_map.entries = 0;
screen_unicode_map.entries = nullptr;
}
}
@ -569,7 +569,7 @@ bool FTermLinux::getUnicodeMap()
return false;
screen_unicode_map.entry_ct = 0;
screen_unicode_map.entries = 0;
screen_unicode_map.entries = nullptr;
// get count
ret = ioctl (fd_tty, GIO_UNIMAP, &screen_unicode_map);

View File

@ -33,16 +33,16 @@ bool FTermXTerminal::meta_sends_esc;
bool FTermXTerminal::xterm_default_colors;
std::size_t FTermXTerminal::term_width = 80;
std::size_t FTermXTerminal::term_height = 24;
const FString* FTermXTerminal::xterm_font = 0;
const FString* FTermXTerminal::xterm_title = 0;
const FString* FTermXTerminal::foreground_color = 0;
const FString* FTermXTerminal::background_color = 0;
const FString* FTermXTerminal::cursor_color = 0;
const FString* FTermXTerminal::mouse_foreground_color = 0;
const FString* FTermXTerminal::mouse_background_color = 0;
const FString* FTermXTerminal::highlight_background_color = 0;
FTermcap::tcap_map* FTermXTerminal::tcap = 0;
FTermDetection* FTermXTerminal::term_detection = 0;
const FString* FTermXTerminal::xterm_font = nullptr;
const FString* FTermXTerminal::xterm_title = nullptr;
const FString* FTermXTerminal::foreground_color = nullptr;
const FString* FTermXTerminal::background_color = nullptr;
const FString* FTermXTerminal::cursor_color = nullptr;
const FString* FTermXTerminal::mouse_foreground_color = nullptr;
const FString* FTermXTerminal::mouse_background_color = nullptr;
const FString* FTermXTerminal::highlight_background_color = nullptr;
FTermcap::tcap_map* FTermXTerminal::tcap = nullptr;
FTermDetection* FTermXTerminal::term_detection = nullptr;
fc::xtermCursorStyle FTermXTerminal::cursor_style = fc::unknown_cursor_style;
@ -257,7 +257,7 @@ void FTermXTerminal::resetForeground()
if ( foreground_color )
delete foreground_color;
foreground_color = 0;
foreground_color = nullptr;
resetXTermForeground();
}
@ -269,7 +269,7 @@ void FTermXTerminal::resetBackground()
if ( background_color )
delete background_color;
background_color = 0;
background_color = nullptr;
resetXTermBackground();
}
@ -281,7 +281,7 @@ void FTermXTerminal::resetCursorColor()
if ( cursor_color )
delete cursor_color;
cursor_color = 0;
cursor_color = nullptr;
resetXTermCursorColor();
}
@ -293,7 +293,7 @@ void FTermXTerminal::resetMouseForeground()
if ( mouse_foreground_color )
delete mouse_foreground_color;
mouse_foreground_color = 0;
mouse_foreground_color = nullptr;
resetXTermMouseForeground();
}
@ -305,7 +305,7 @@ void FTermXTerminal::resetMouseBackground()
if ( mouse_background_color )
delete mouse_background_color;
mouse_background_color = 0;
mouse_background_color = nullptr;
resetXTermMouseBackground();
}
@ -317,7 +317,7 @@ void FTermXTerminal::resetHighlightBackground()
if ( highlight_background_color )
delete highlight_background_color;
highlight_background_color = 0;
highlight_background_color = nullptr;
resetXTermHighlightBackground();
}

View File

@ -54,7 +54,7 @@ FToolTip::~FToolTip() // destructor
if ( fapp->isQuit() )
return;
FWindow* parent_win = 0;
FWindow* parent_win = nullptr;
if ( FWidget* parent = getParentWidget() )
parent_win = getWindowWidget(parent);

View File

@ -34,7 +34,7 @@ namespace finalcut
{
// global FVTerm object
static FVTerm* init_object = 0;
static FVTerm* init_object = nullptr;
// static class attributes
bool FVTerm::terminal_update_complete;
@ -47,14 +47,14 @@ uInt FVTerm::repeat_char_length;
uInt FVTerm::clr_bol_length;
uInt FVTerm::clr_eol_length;
uInt FVTerm::cursor_address_length;
std::queue<int>* FVTerm::output_buffer = 0;
FPoint* FVTerm::term_pos = 0;
FTerm* FVTerm::fterm = 0;
FVTerm::term_area* FVTerm::vterm = 0;
FVTerm::term_area* FVTerm::vdesktop = 0;
FVTerm::term_area* FVTerm::active_area = 0;
FTermcap::tcap_map* FVTerm::tcap = 0;
FKeyboard* FVTerm::keyboard = 0;
std::queue<int>* FVTerm::output_buffer = nullptr;
FPoint* FVTerm::term_pos = nullptr;
FTerm* FVTerm::fterm = nullptr;
FVTerm::term_area* FVTerm::vterm = nullptr;
FVTerm::term_area* FVTerm::vdesktop = nullptr;
FVTerm::term_area* FVTerm::active_area = nullptr;
FTermcap::tcap_map* FVTerm::tcap = nullptr;
FKeyboard* FVTerm::keyboard = nullptr;
FVTerm::charData FVTerm::term_attribute;
FVTerm::charData FVTerm::next_attribute;
FVTerm::charData FVTerm::s_ch;
@ -790,17 +790,17 @@ void FVTerm::removeArea (term_area*& area)
if ( area->changes != 0 )
{
delete[] area->changes;
area->changes = 0;
area->changes = nullptr;
}
if ( area->text != 0 )
{
delete[] area->text;
area->text = 0;
area->text = nullptr;
}
delete area;
area = 0;
area = nullptr;
}
}
@ -1972,8 +1972,8 @@ void FVTerm::flush_out()
void FVTerm::init (bool disable_alt_screen)
{
init_object = this;
vterm = 0;
vdesktop = 0;
vterm = nullptr;
vdesktop = nullptr;
try
{

View File

@ -31,17 +31,17 @@ namespace finalcut
{
// global FWidget object
static FWidget* rootObject = 0;
static FWidget* rootObject = nullptr;
// static class attributes
FStatusBar* FWidget::statusbar = 0;
FMenuBar* FWidget::menubar = 0;
FWidget* FWidget::show_root_widget = 0;
FWidget* FWidget::redraw_root_widget = 0;
FWidget::widgetList* FWidget::window_list = 0;
FWidget::widgetList* FWidget::dialog_list = 0;
FWidget::widgetList* FWidget::always_on_top_list = 0;
FWidget::widgetList* FWidget::close_widget = 0;
FStatusBar* FWidget::statusbar = nullptr;
FMenuBar* FWidget::menubar = nullptr;
FWidget* FWidget::show_root_widget = nullptr;
FWidget* FWidget::redraw_root_widget = nullptr;
FWidget::widgetList* FWidget::window_list = nullptr;
FWidget::widgetList* FWidget::dialog_list = nullptr;
FWidget::widgetList* FWidget::always_on_top_list = nullptr;
FWidget::widgetList* FWidget::close_widget = nullptr;
FWidgetColors FWidget::wc;
bool FWidget::init_desktop;
bool FWidget::hideable;
@ -73,10 +73,10 @@ FWidget::FWidget (FWidget* parent, bool disable_alt_screen)
&& "FTerm: There should be only one root object" );
rootObject = this;
show_root_widget = 0;
redraw_root_widget = 0;
show_root_widget = nullptr;
redraw_root_widget = nullptr;
modal_dialogs = 0;
statusbar = 0;
statusbar = nullptr;
init();
}
else
@ -1017,7 +1017,7 @@ void FWidget::redraw()
{
updateTerminal();
flush_out();
redraw_root_widget = 0;
redraw_root_widget = nullptr;
}
}
@ -1094,7 +1094,7 @@ void FWidget::show()
finishTerminalUpdate();
updateTerminal();
flush_out();
show_root_widget = 0;
show_root_widget = nullptr;
}
FShowEvent show_ev (fc::Show_Event);
@ -1669,7 +1669,7 @@ bool FWidget::focusNextChild()
continue;
}
FWidget* next = 0;
FWidget* next = nullptr;
constFObjectIterator next_element;
next_element = iter;
@ -1730,7 +1730,7 @@ bool FWidget::focusPrevChild()
if ( w != this )
continue;
FWidget* prev = 0;
FWidget* prev = nullptr;
constFObjectIterator prev_element;
prev_element = iter;
@ -1979,30 +1979,30 @@ void FWidget::init()
void FWidget::finish()
{
delete accelerator_list;
accelerator_list = 0;
accelerator_list = nullptr;
if ( close_widget )
{
delete close_widget;
close_widget = 0;
close_widget = nullptr;
}
if ( dialog_list )
{
delete dialog_list;
dialog_list = 0;
dialog_list = nullptr;
}
if ( always_on_top_list )
{
delete always_on_top_list;
always_on_top_list = 0;
always_on_top_list = nullptr;
}
if ( window_list )
{
delete window_list;
window_list = 0;
window_list = nullptr;
}
}

View File

@ -29,7 +29,7 @@ namespace finalcut
{
// static attributes
FWindow* FWindow::previous_window = 0;
FWindow* FWindow::previous_window = nullptr;
//----------------------------------------------------------------------
@ -54,7 +54,7 @@ FWindow::~FWindow() // destructor
FApplication* fapp = static_cast<FApplication*>(getRootWidget());
if ( previous_window == this )
previous_window = 0;
previous_window = nullptr;
if ( isAlwaysOnTop() )
deleteFromAlwaysOnTopList (this);

View File

@ -92,7 +92,7 @@ inline const FString& emptyFString::get()
inline void emptyFString::clear()
{
delete empty_string;
empty_string = 0;
empty_string = nullptr;
}
} // namespace fc

View File

@ -68,8 +68,8 @@ class FButton : public FWidget
{
public:
// Constructors
explicit FButton (FWidget* = 0);
explicit FButton (const FString&, FWidget* = 0);
explicit FButton (FWidget* = nullptr);
explicit FButton (const FString&, FWidget* = nullptr);
// Disable copy constructor
FButton (const FButton&) = delete;
// Destructor

View File

@ -72,8 +72,8 @@ class FButtonGroup : public FScrollView
{
public:
// Constructors
explicit FButtonGroup (FWidget* = 0);
explicit FButtonGroup (const FString&, FWidget* = 0);
explicit FButtonGroup (FWidget* = nullptr);
explicit FButtonGroup (const FString&, FWidget* = nullptr);
// Disable copy constructor
FButtonGroup (const FButtonGroup&) = delete;
// Destructor

View File

@ -73,8 +73,8 @@ class FCheckBox : public FToggleButton
{
public:
// Constructors
explicit FCheckBox (FWidget* = 0);
explicit FCheckBox (const FString&, FWidget* = 0);
explicit FCheckBox (FWidget* = nullptr);
explicit FCheckBox (const FString&, FWidget* = nullptr);
// Disable copy constructor
FCheckBox (const FCheckBox&) = delete;
// Destructor

View File

@ -73,8 +73,8 @@ class FCheckMenuItem : public FMenuItem
{
public:
// Constructors
explicit FCheckMenuItem (FWidget* = 0);
explicit FCheckMenuItem (const FString&, FWidget* = 0);
explicit FCheckMenuItem (FWidget* = nullptr);
explicit FCheckMenuItem (const FString&, FWidget* = nullptr);
// Disable copy constructor
FCheckMenuItem (const FCheckMenuItem&) = delete;
// Destructor

View File

@ -87,8 +87,8 @@ class FDialog : public FWindow
};
// Constructors
explicit FDialog (FWidget* = 0);
explicit FDialog (const FString&, FWidget* = 0);
explicit FDialog (FWidget* = nullptr);
explicit FDialog (const FString&, FWidget* = nullptr);
// Disable copy constructor
FDialog (const FDialog&) = delete;
// Destructor
@ -229,12 +229,12 @@ class FDialog : public FWindow
FPoint titlebar_click_pos{};
FPoint resize_click_pos{};
FRect save_geometry{}; // required by keyboard move/size
FMenu* dialog_menu{0};
FMenuItem* dgl_menuitem{0};
FMenuItem* move_size_item{0};
FMenuItem* zoom_item{0};
FMenuItem* close_item{0};
FToolTip* tooltip{0};
FMenu* dialog_menu{nullptr};
FMenuItem* dgl_menuitem{nullptr};
FMenuItem* move_size_item{nullptr};
FMenuItem* zoom_item{nullptr};
FMenuItem* close_item{nullptr};
FToolTip* tooltip{nullptr};
// Friend function from FMenu
friend void FMenu::hideSuperMenus();

View File

@ -79,8 +79,8 @@ class FDialogListMenu : public FMenu
{
public:
// Constructors
explicit FDialogListMenu (FWidget* = 0);
explicit FDialogListMenu (const FString&, FWidget* = 0);
explicit FDialogListMenu (FWidget* = nullptr);
explicit FDialogListMenu (const FString&, FWidget* = nullptr);
// Disable copy constructor
FDialogListMenu (const FDialogListMenu&) = delete;
// Destructor

View File

@ -102,12 +102,12 @@ class FFileDialog : public FDialog
};
// Constructors
explicit FFileDialog (FWidget* = 0);
explicit FFileDialog (FWidget* = nullptr);
FFileDialog (const FFileDialog&); // copy constructor
FFileDialog ( const FString&
, const FString&
, DialogType = FFileDialog::Open
, FWidget* = 0 );
, FWidget* = nullptr );
// Destructor
virtual ~FFileDialog();
@ -186,7 +186,7 @@ class FFileDialog : public FDialog
void cb_processShowHidden (FWidget*, data_ptr);
// Data Members
DIR* directory_stream{0};
DIR* directory_stream{nullptr};
dirEntries dir_entries{};
FString directory{};
FString filter_pattern{};

View File

@ -60,15 +60,16 @@ class FKeyboardCommand
{
public:
// Constructor
explicit FKeyboardCommand (FApplication* = 0, void(FApplication::*)() = 0);
explicit FKeyboardCommand ( FApplication* = nullptr
, void(FApplication::*)() = nullptr);
// Method
void execute();
private:
// Data Members
FApplication* instance{0};
void (FApplication::*handler)(){0};
FApplication* instance{nullptr};
void (FApplication::*handler)(){nullptr};
};
#pragma pack(pop)
@ -180,7 +181,7 @@ class FKeyboard
FKeyboardCommand escape_key_cmd{};
static timeval time_keypressed;
fc::fkeymap* key_map{0};
fc::fkeymap* key_map{nullptr};
#if defined(__linux__)
#undef linux

View File

@ -73,8 +73,8 @@ class FLabel : public FWidget
using FWidget::setEnable;
// Constructor
explicit FLabel (FWidget* = 0);
explicit FLabel (const FString&, FWidget* = 0);
explicit FLabel (FWidget* = nullptr);
explicit FLabel (const FString&, FWidget* = nullptr);
// Disable copy constructor
FLabel (const FLabel&) = delete;
// Destructor
@ -104,7 +104,7 @@ class FLabel : public FWidget
FString& getText();
// Mutators
void setAccelWidget (FWidget* = 0);
void setAccelWidget (FWidget* = nullptr);
void setAlignment(fc::text_alignment);
bool setEmphasis(bool);
bool setEmphasis();
@ -160,7 +160,7 @@ class FLabel : public FWidget
FColor ellipsis_color{wc.label_ellipsis_fg};
bool emphasis{false};
bool reverse_mode{false};
FWidget* accel_widget{0};
FWidget* accel_widget{nullptr};
};
#pragma pack(pop)

View File

@ -76,8 +76,8 @@ class FLineEdit : public FWidget
};
// Constructor
explicit FLineEdit (FWidget* = 0);
explicit FLineEdit (const FString&, FWidget* = 0);
explicit FLineEdit (FWidget* = nullptr);
explicit FLineEdit (const FString&, FWidget* = nullptr);
// Disable copy constructor
FLineEdit (const FLineEdit&) = delete;
// Destructor

View File

@ -75,7 +75,7 @@ class FListBoxItem
// Constructors
FListBoxItem ();
FListBoxItem (const FListBoxItem&); // copy constructor
explicit FListBoxItem (const FString&, FWidget::data_ptr = 0);
explicit FListBoxItem (const FString&, FWidget::data_ptr = nullptr);
// Destructor
virtual ~FListBoxItem();
@ -100,7 +100,7 @@ class FListBoxItem
// Data Members
FString text{};
FWidget::data_ptr data_pointer{0};
FWidget::data_ptr data_pointer{nullptr};
fc::brackets_type brackets{fc::NoBrackets};
bool selected{false};
};
@ -146,11 +146,11 @@ class FListBox : public FWidget
using FWidget::setGeometry;
// Constructor
explicit FListBox (FWidget* = 0);
explicit FListBox (FWidget* = nullptr);
template <typename Iterator, typename InsertConverter>
FListBox (Iterator, Iterator, InsertConverter, FWidget* = 0);
FListBox (Iterator, Iterator, InsertConverter, FWidget* = nullptr);
template <typename Container, typename LazyConverter>
FListBox (Container, LazyConverter, FWidget* = 0);
FListBox (Container, LazyConverter, FWidget* = nullptr);
// Disable copy constructor
FListBox (const FListBox&) = delete;
// Destructor
@ -204,11 +204,11 @@ class FListBox : public FWidget
void insert ( const FString&
, fc::brackets_type = fc::NoBrackets
, bool = false
, data_ptr = 0 );
, data_ptr = nullptr );
void insert ( long
, fc::brackets_type = fc::NoBrackets
, bool = false
, data_ptr = 0 );
, data_ptr = nullptr );
void remove (std::size_t);
void clear();
@ -297,14 +297,14 @@ class FListBox : public FWidget
// Function Pointer
void (*convertToItem) ( FListBoxItem&
, FWidget::data_ptr
, int index ){0};
, int index ){nullptr};
// Data Members
listBoxItems itemlist{};
FWidget::data_ptr source_container{0};
FWidget::data_ptr source_container{nullptr};
convert_type conv_type{FListBox::no_convert};
FScrollbar* vbar{0};
FScrollbar* hbar{0};
FScrollbar* vbar{nullptr};
FScrollbar* hbar{nullptr};
FString text{};
FString inc_search{};
bool multi_select{false};

View File

@ -129,7 +129,7 @@ class FListViewItem : public FObject
// Data Members
FStringList column_list{};
FWidget::data_ptr data_pointer{0};
FWidget::data_ptr data_pointer{nullptr};
FObjectIterator root{};
std::size_t visible_lines{1};
bool expandable{false};
@ -272,7 +272,7 @@ class FListView : public FWidget
using FWidget::setGeometry;
// Constructor
explicit FListView (FWidget* = 0);
explicit FListView (FWidget* = nullptr);
// Disable copy constructor
FListView (const FListView&) = delete;
// Destructor
@ -315,14 +315,14 @@ class FListView : public FWidget
FObjectIterator insert (FListViewItem*);
FObjectIterator insert (FListViewItem*, FObjectIterator);
FObjectIterator insert ( const FStringList&
, data_ptr = 0 );
, data_ptr = nullptr );
FObjectIterator insert ( const FStringList&
, FObjectIterator );
FObjectIterator insert ( const FStringList&
, data_ptr
, FObjectIterator );
FObjectIterator insert ( const std::vector<long>&
, data_ptr = 0 );
, data_ptr = nullptr );
FObjectIterator insert ( const std::vector<long>&
, FObjectIterator );
FObjectIterator insert ( const std::vector<long>&
@ -428,8 +428,8 @@ class FListView : public FWidget
FListViewIterator last_visible_line{};
headerItems header{};
FTermBuffer headerline{};
FScrollbar* vbar{0};
FScrollbar* hbar{0};
FScrollbar* vbar{nullptr};
FScrollbar* hbar{nullptr};
fc::dragScroll drag_scroll{fc::noScroll};
int scroll_repeat{100};
int scroll_distance{1};
@ -439,15 +439,15 @@ class FListView : public FWidget
bool has_checkable_items{false};
FPoint clicked_expander_pos{-1, -1};
FPoint clicked_header_pos{-1, -1};
const FListViewItem* clicked_checkbox_item{0};
const FListViewItem* clicked_checkbox_item{nullptr};
int xoffset{0};
std::size_t nf_offset{0};
std::size_t max_line_width{1};
int sort_column{-1};
sortTypes sort_type{};
fc::sorting_order sort_order{fc::unsorted};
bool (*user_defined_ascending) (const FObject*, const FObject*){0};
bool (*user_defined_descending) (const FObject*, const FObject*){0};
bool (*user_defined_ascending) (const FObject*, const FObject*){nullptr};
bool (*user_defined_descending) (const FObject*, const FObject*){nullptr};
// Friend class
friend class FListViewItem;

View File

@ -78,8 +78,8 @@ class FMenu : public FWindow, public FMenuList
{
public:
// Constructor
explicit FMenu (FWidget* = 0);
explicit FMenu (const FString&, FWidget* = 0);
explicit FMenu (FWidget* = nullptr);
explicit FMenu (const FString&, FWidget* = nullptr);
// Disable copy constructor
FMenu (const FMenu&) = delete;
// Destructor
@ -230,9 +230,9 @@ class FMenu : public FWindow, public FMenuList
// Data Members
FMenuItem item{};
FWidget* super_menu{0};
FMenu* opened_sub_menu{0};
FMenu* shown_sub_menu{0};
FWidget* super_menu{nullptr};
FMenu* opened_sub_menu{nullptr};
FMenu* shown_sub_menu{nullptr};
std::size_t max_item_width{0};
std::size_t hotkeypos{NOT_SET};
bool mouse_down{false};

View File

@ -77,7 +77,7 @@ class FMenuBar : public FWindow, public FMenuList
{
public:
// Constructor
explicit FMenuBar (FWidget* = 0);
explicit FMenuBar (FWidget* = nullptr);
// Disable copy constructor
FMenuBar (const FMenuBar&) = delete;
// Destructor

View File

@ -82,9 +82,9 @@ class FMenuItem : public FWidget
using FWidget::setEnable;
// Constructor
explicit FMenuItem (FWidget* = 0);
explicit FMenuItem (const FString&, FWidget* = 0);
FMenuItem (FKey, const FString&, FWidget* = 0);
explicit FMenuItem (FWidget* = nullptr);
explicit FMenuItem (const FString&, FWidget* = nullptr);
FMenuItem (FKey, const FString&, FWidget* = nullptr);
// Disable copy constructor
FMenuItem (const FMenuItem&) = delete;
// Destructor
@ -159,9 +159,9 @@ class FMenuItem : public FWidget
std::size_t text_length{0};
uChar hotkey{0};
FKey accel_key{0};
FMenu* menu{0};
FWidget* super_menu{0};
FDialog* associated_window{0};
FMenu* menu{nullptr};
FWidget* super_menu{nullptr};
FDialog* associated_window{nullptr};
private:
// Accessor

View File

@ -95,11 +95,11 @@ class FMessageBox : public FDialog
};
// Constructors
explicit FMessageBox (FWidget* = 0);
explicit FMessageBox (FWidget* = nullptr);
FMessageBox (const FMessageBox&); // copy constructor
FMessageBox ( const FString&, const FString&
, int, int, int
, FWidget* = 0 );
, FWidget* = nullptr );
// Destructor
virtual ~FMessageBox();
@ -161,7 +161,7 @@ class FMessageBox : public FDialog
// Data Members
FString headline_text{};
FString text{};
FString* text_components{0};
FString* text_components{nullptr};
FStringList text_split{};
std::size_t max_line_width{0};
bool center_text{false};
@ -169,7 +169,7 @@ class FMessageBox : public FDialog
uInt num_buttons{0};
uInt text_num_lines{0};
int button_digit[3]{0};
FButton* button[3]{0};
FButton* button[3]{nullptr};
};
#pragma pack(pop)

View File

@ -71,7 +71,7 @@ class FObject
typedef FObjectList::const_iterator constFObjectIterator;
// Constructor
explicit FObject (FObject* = 0);
explicit FObject (FObject* = nullptr);
// Disable copy constructor
FObject (const FObject&) = delete;
// Destructor
@ -144,7 +144,7 @@ class FObject
virtual void performTimerAction (const FObject*, const FEvent*);
// Data Members
FObject* parent_obj{};
FObject* parent_obj{nullptr};
FObjectList children_list{}; // no children yet
bool has_parent{false};
bool widget_object{false};

View File

@ -71,7 +71,7 @@ class FProgressbar : public FWidget
using FWidget::setGeometry;
// Constructor
explicit FProgressbar(FWidget* = 0);
explicit FProgressbar(FWidget* = nullptr);
// Destructor
virtual ~FProgressbar();

View File

@ -73,8 +73,8 @@ class FRadioButton : public FToggleButton
{
public:
// Constructors
explicit FRadioButton (FWidget* = 0);
explicit FRadioButton (const FString&, FWidget* = 0);
explicit FRadioButton (FWidget* = nullptr);
explicit FRadioButton (const FString&, FWidget* = nullptr);
// Disable copy constructor
FRadioButton (const FRadioButton&) = delete;
// Destructor

View File

@ -73,8 +73,8 @@ class FRadioMenuItem : public FMenuItem
{
public:
// Constructors
explicit FRadioMenuItem (FWidget* = 0);
explicit FRadioMenuItem (const FString&, FWidget* = 0);
explicit FRadioMenuItem (FWidget* = nullptr);
explicit FRadioMenuItem (const FString&, FWidget* = nullptr);
// Disable copy constructor
FRadioMenuItem (const FRadioMenuItem&) = delete;
// Destructor

View File

@ -84,8 +84,8 @@ class FScrollbar : public FWidget
};
// Constructors
explicit FScrollbar (FWidget* = 0);
explicit FScrollbar (int = fc::vertical, FWidget* = 0);
explicit FScrollbar (FWidget* = nullptr);
explicit FScrollbar (int = fc::vertical, FWidget* = nullptr);
// Disable copy constructor
FScrollbar (const FScrollbar&) = delete;
// Destructor

View File

@ -75,7 +75,7 @@ class FScrollView : public FWidget
using FWidget::setPos;
// Constructor
explicit FScrollView (FWidget* = 0);
explicit FScrollView (FWidget* = nullptr);
// Disable copy constructor
FScrollView (const FScrollView&) = delete;
// Destructor
@ -176,9 +176,9 @@ class FScrollView : public FWidget
// Data Members
FRect scroll_geometry{1, 1, 1, 1};
FRect viewport_geometry{};
term_area* viewport{0}; // virtual scroll content
FScrollbar* vbar{0};
FScrollbar* hbar{0};
term_area* viewport{nullptr}; // virtual scroll content
FScrollbar* vbar{nullptr};
FScrollbar* hbar{nullptr};
uInt8 nf_offset{0};
bool border{true};
bool use_own_print_area{false};

View File

@ -80,8 +80,8 @@ class FStatusKey : public FWidget
{
public:
// Constructors
explicit FStatusKey (FWidget* = 0);
FStatusKey (FKey, const FString&, FWidget* = 0);
explicit FStatusKey (FWidget* = nullptr);
FStatusKey (FKey, const FString&, FWidget* = nullptr);
// Disable copy constructor
FStatusKey (const FStatusKey&) = delete;
// Destructor
@ -126,7 +126,7 @@ class FStatusKey : public FWidget
FString text{};
bool active{false};
bool mouse_focus{false};
FStatusBar* bar{0};
FStatusBar* bar{nullptr};
};
#pragma pack(pop)
@ -192,7 +192,7 @@ class FStatusBar : public FWindow
{
public:
// Constructor
explicit FStatusBar (FWidget* = 0);
explicit FStatusBar (FWidget* = nullptr);
// Disable copy constructor
FStatusBar (const FStatusBar&) = delete;
// Destructor

View File

@ -278,10 +278,10 @@ class FString
wchar_t* extractToken (wchar_t*[], const wchar_t[], const wchar_t[]);
// Data Members
wchar_t* string{0};
wchar_t* string{nullptr};
std::size_t length{0};
std::size_t bufsize{0};
mutable char* c_string{0};
mutable char* c_string{nullptr};
};
#pragma pack(pop)

View File

@ -73,8 +73,8 @@ class FSwitch : public FToggleButton
{
public:
// Constructors
explicit FSwitch (FWidget* = 0);
explicit FSwitch (const FString&, FWidget* = 0);
explicit FSwitch (FWidget* = nullptr);
explicit FSwitch (const FString&, FWidget* = nullptr);
// Disable copy constructor
FSwitch (const FSwitch&) = delete;
// Destructor

View File

@ -71,8 +71,8 @@ class FTermDebugData
private:
// Data Members
FTermDetection* term_detection{0};
FTermData* data{0};
FTermDetection* term_detection{nullptr};
FTermData* data{nullptr};
};
// FTermDebugData inline functions

View File

@ -215,13 +215,13 @@ class FTermDetection
{
void setDefault()
{
string1 = 0;
string2 = 0;
string3 = 0;
string4 = 0;
string5 = 0;
string6 = 0;
string7 = 0;
string1 = nullptr;
string2 = nullptr;
string3 = nullptr;
string4 = nullptr;
string5 = nullptr;
string6 = nullptr;
string7 = nullptr;
}
char* string1;

View File

@ -77,7 +77,7 @@ class FTextView : public FWidget
using FWidget::setGeometry;
// Constructor
explicit FTextView (FWidget* = 0);
explicit FTextView (FWidget* = nullptr);
// Disable copy constructor
FTextView (const FTextView&) = delete;
// Destructor
@ -145,8 +145,8 @@ class FTextView : public FWidget
// Data Members
FStringList data{};
FScrollbar* vbar{0};
FScrollbar* hbar{0};
FScrollbar* vbar{nullptr};
FScrollbar* hbar{nullptr};
bool update_scrollbar{true};
int xoffset{0};
int yoffset{0};

View File

@ -74,8 +74,8 @@ class FToggleButton : public FWidget
using FWidget::setGeometry;
// Constructors
explicit FToggleButton (FWidget* = 0);
explicit FToggleButton (const FString&, FWidget* = 0);
explicit FToggleButton (FWidget* = nullptr);
explicit FToggleButton (const FString&, FWidget* = nullptr);
// Disable copy constructor
FToggleButton (const FToggleButton&) = delete;
// Destructor
@ -162,7 +162,7 @@ class FToggleButton : public FWidget
friend class FButtonGroup;
// Data Members
FButtonGroup* button_group{0};
FButtonGroup* button_group{nullptr};
bool focus_inside_group{true};
FString text{};
};

View File

@ -75,8 +75,8 @@ class FToolTip : public FWindow
{
public:
// Constructor
explicit FToolTip (FWidget* = 0);
explicit FToolTip (const FString&, FWidget* = 0);
explicit FToolTip (FWidget* = nullptr);
explicit FToolTip (const FString&, FWidget* = nullptr);
// Disable copy constructor
FToolTip (const FToolTip&) = delete;
// Destructor
@ -108,7 +108,7 @@ class FToolTip : public FWindow
// Data Members
FString text{};
FString* text_components{0};
FString* text_components{nullptr};
FStringList text_split{};
std::size_t max_line_width{0};
std::size_t text_num_lines{0};

View File

@ -427,12 +427,12 @@ class FVTerm
;
// Data Members
static term_area* vterm; // virtual terminal
static term_area* vdesktop; // virtual desktop
static term_area* active_area; // active area
term_area* print_area{0}; // print area for this object
term_area* child_print_area{0}; // print area for children
term_area* vwin{0}; // virtual window
static term_area* vterm; // virtual terminal
static term_area* vdesktop; // virtual desktop
static term_area* active_area; // active area
term_area* print_area{nullptr}; // print area for this object
term_area* child_print_area{nullptr}; // print area for children
term_area* vwin{nullptr}; // virtual window
private:
// Typedef and Enumeration
@ -536,20 +536,20 @@ struct FVTerm::term_area // define virtual terminal character properties
// Disable assignment operator (=)
term_area& operator = (const term_area&) = delete;
int offset_left{0}; // Distance from left terminal side
int offset_top{0}; // Distance from top of the terminal
int width{-1}; // Window width
int height{-1}; // Window height
int right_shadow{0}; // Right window shadow
int bottom_shadow{0}; // Bottom window shadow
int cursor_x{0}; // X-position for the next write operation
int cursor_y{0}; // Y-position for the next write operation
int input_cursor_x{-1}; // X-position input cursor
int input_cursor_y{-1}; // Y-position input cursor
FWidget* widget{}; // Widget that owns this term_area
int offset_left{0}; // Distance from left terminal side
int offset_top{0}; // Distance from top of the terminal
int width{-1}; // Window width
int height{-1}; // Window height
int right_shadow{0}; // Right window shadow
int bottom_shadow{0}; // Bottom window shadow
int cursor_x{0}; // X-position for the next write operation
int cursor_y{0}; // Y-position for the next write operation
int input_cursor_x{-1}; // X-position input cursor
int input_cursor_y{-1}; // Y-position input cursor
FWidget* widget{nullptr}; // Widget that owns this term_area
FPreprocessing preprocessing_call{};
line_changes* changes{0};
charData* text{0}; // Text data for the output
line_changes* changes{nullptr};
charData* text{nullptr}; // Text data for the output
bool input_cursor_visible{false};
bool has_changes{false};
bool visible{false};

View File

@ -166,7 +166,7 @@ class FWidget : public FVTerm, public FObject
};
// Constructor
explicit FWidget (FWidget* = 0, bool = false);
explicit FWidget (FWidget* = nullptr, bool = false);
// Disable copy constructor
FWidget (const FWidget&) = delete;
// Destructor
@ -305,11 +305,11 @@ class FWidget : public FVTerm, public FObject
void clearStatusbarMessage();
void addCallback ( const FString&
, FCallback
, data_ptr = null );
, data_ptr = nullptr );
void addCallback ( const FString&
, FWidget*
, FMemberCallback
, data_ptr = null );
, data_ptr = nullptr );
void delCallback (FCallback);
void delCallback (FWidget*);
void delCallbacks();
@ -338,7 +338,7 @@ class FWidget : public FVTerm, public FObject
// Data Members
static widgetList* window_list;
Accelerators* accelerator_list{0};
Accelerators* accelerator_list{nullptr};
protected:
struct callback_data

View File

@ -82,7 +82,7 @@ class FWindow : public FWidget
using FWidget::move;
// Constructor
explicit FWindow (FWidget* = 0);
explicit FWindow (FWidget* = nullptr);
// Disable copy constructor
FWindow (const FWindow&) = delete;
// Destructor
@ -179,7 +179,7 @@ class FWindow : public FWidget
// Data Members
bool window_active{false};
bool zoomed{false};
FWidget* win_focus_widget{0};
FWidget* win_focus_widget{nullptr};
FRect normalGeometry{};
};
#pragma pack(pop)

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
check: test
test: debug

View File

@ -279,7 +279,7 @@ class FKeyboardTest : public CPPUNIT_NS::TestFixture
FKey key_pressed{0};
FKey key_released{0};
int number_of_keys{0};
finalcut::FKeyboard* keyboard{0};
finalcut::FKeyboard* keyboard{nullptr};
};
#pragma pack(pop)

View File

@ -133,7 +133,7 @@ void FOptiAttrTest::noArgumentTest()
CPPUNIT_ASSERT ( oa.isNormal(ch) );
// Null test
finalcut::FOptiAttr::charData* ch_null = 0;
finalcut::FOptiAttr::charData* ch_null = nullptr;
CPPUNIT_ASSERT ( oa.changeAttribute(ch, ch) == 0 );
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch, ch_null), C_STR("") );
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch), C_STR("") );

View File

@ -95,7 +95,7 @@ void FPointTest::classNameTest()
//----------------------------------------------------------------------
void FPointTest::noArgumentTest()
{
const finalcut::FPoint point;
const finalcut::FPoint point{};
CPPUNIT_ASSERT ( point.getX() == 0 );
CPPUNIT_ASSERT ( point.getY() == 0 );
CPPUNIT_ASSERT ( point.isNull() );
@ -226,8 +226,8 @@ void FPointTest::equalTest()
CPPUNIT_ASSERT ( p1 == p2 );
CPPUNIT_ASSERT ( finalcut::FPoint(1,2) == p2 );
CPPUNIT_ASSERT ( p1 == finalcut::FPoint(1,2) );
const finalcut::FPoint p3;
const finalcut::FPoint p4;
const finalcut::FPoint p3{};
const finalcut::FPoint p4{};
CPPUNIT_ASSERT ( p3 == p4 );
CPPUNIT_ASSERT ( p3 == -p4 );
}

View File

@ -99,7 +99,7 @@ void FRectTest::classNameTest()
//----------------------------------------------------------------------
void FRectTest::noArgumentTest()
{
const finalcut::FRect rectangle;
const finalcut::FRect rectangle{};
CPPUNIT_ASSERT ( rectangle.getX1() == 0 );
CPPUNIT_ASSERT ( rectangle.getY1() == 0 );
CPPUNIT_ASSERT ( rectangle.getX2() == -1 );
@ -299,8 +299,8 @@ void FRectTest::equalTest()
CPPUNIT_ASSERT ( r1 == r2 );
CPPUNIT_ASSERT ( finalcut::FRect(1, 2, 10, 20) == r2 );
CPPUNIT_ASSERT ( r1 == finalcut::FRect(1, 2, 10, 20) );
const finalcut::FRect r3;
const finalcut::FRect r4;
const finalcut::FRect r3{};
const finalcut::FRect r4{};
CPPUNIT_ASSERT ( r3 == r4 );
}

View File

@ -584,8 +584,8 @@ void FStringTest::equalTest()
const std::wstring wst = L"abc";
CPPUNIT_ASSERT ( str == wst );
const finalcut::FString null_str1;
const finalcut::FString null_str2;
const finalcut::FString null_str1{};
const finalcut::FString null_str2{};
CPPUNIT_ASSERT ( ! (str == null_str2) );
CPPUNIT_ASSERT ( ! (null_str1 == str) );
CPPUNIT_ASSERT ( null_str1 == null_str2 );
@ -635,8 +635,8 @@ void FStringTest::notEqualTest()
const std::wstring wst = L"abc";
CPPUNIT_ASSERT ( s1 != wst );
const finalcut::FString null_str1;
const finalcut::FString null_str2;
const finalcut::FString null_str1{};
const finalcut::FString null_str2{};
CPPUNIT_ASSERT ( s1 != null_str2 );
CPPUNIT_ASSERT ( null_str1 != s1 );
CPPUNIT_ASSERT ( ! (null_str1 != null_str2) );
@ -680,8 +680,8 @@ void FStringTest::lessEqualTest()
CPPUNIT_ASSERT ( s1 <= wst1 && s1 == wst1 );
CPPUNIT_ASSERT ( s1 <= wst2 && s1 != wst2 );
const finalcut::FString null_str1;
const finalcut::FString null_str2;
const finalcut::FString null_str1{};
const finalcut::FString null_str2{};
const finalcut::FString empty("");
CPPUNIT_ASSERT ( ! (s1 <= null_str2) );
CPPUNIT_ASSERT ( null_str1 <= s2 );
@ -715,8 +715,8 @@ void FStringTest::lessTest()
const std::wstring wst = L"xzz";
CPPUNIT_ASSERT ( s1 < wst );
const finalcut::FString null_str1;
const finalcut::FString null_str2;
const finalcut::FString null_str1{};
const finalcut::FString null_str2{};
CPPUNIT_ASSERT ( ! (s1 < null_str2) );
CPPUNIT_ASSERT ( null_str1 < s2 );
CPPUNIT_ASSERT ( ! (null_str1 < null_str2) );
@ -758,8 +758,8 @@ void FStringTest::greaterEqualTest()
CPPUNIT_ASSERT ( s1 >= wst1 && s1 == wst1 );
CPPUNIT_ASSERT ( s1 >= wst2 && s1 != wst2 );
const finalcut::FString null_str1;
const finalcut::FString null_str2;
const finalcut::FString null_str1{};
const finalcut::FString null_str2{};
const finalcut::FString empty("");
CPPUNIT_ASSERT ( s1 >= null_str2 );
CPPUNIT_ASSERT ( ! (null_str1 >= s2) );
@ -793,8 +793,8 @@ void FStringTest::greaterTest()
const std::wstring wst = L"xww";
CPPUNIT_ASSERT ( s1 > wst );
const finalcut::FString null_str1;
const finalcut::FString null_str2;
const finalcut::FString null_str1{};
const finalcut::FString null_str2{};
CPPUNIT_ASSERT ( s1 > null_str2 );
CPPUNIT_ASSERT ( ! (null_str1 > s2) );
CPPUNIT_ASSERT ( ! (null_str1 > null_str2) );
@ -1032,7 +1032,7 @@ void FStringTest::formatTest()
CPPUNIT_ASSERT ( str2 == "Add a looo" + finalcut::FString(2048, 'o')
+ "ooong string" );
const finalcut::FString null_fstring;
const finalcut::FString null_fstring{};
str2.sprintf (null_fstring, 0);
CPPUNIT_ASSERT ( str2.isNull() );
@ -1272,7 +1272,7 @@ void FStringTest::trimTest()
CPPUNIT_ASSERT ( trim_str2.ltrim().getLength() == 0 );
CPPUNIT_ASSERT ( trim_str2.ltrim().capacity() == 0 );
const finalcut::FString trim_str3;
const finalcut::FString trim_str3{};
CPPUNIT_ASSERT ( trim_str3.ltrim().isEmpty() );
CPPUNIT_ASSERT ( trim_str3.ltrim().isEmpty() );
CPPUNIT_ASSERT ( trim_str3.ltrim().getLength() == 0 );
@ -1663,7 +1663,7 @@ void FStringTest::removeTest()
void FStringTest::includesTest()
{
const finalcut::FString str = "Look behind you, a three-headed monkey!";
const finalcut::FString empty1;
const finalcut::FString empty1{};
const wchar_t* empty2 = 0;
const char* empty3 = 0;
const finalcut::FString search1 = "you";

View File

@ -436,7 +436,7 @@ class FTermDetectionTest : public CPPUNIT_NS::TestFixture
#pragma pack(pop)
// static class attributes
bool* FTermDetectionTest::shared_state = 0;
bool* FTermDetectionTest::shared_state = nullptr;
//----------------------------------------------------------------------
FTermDetectionTest::FTermDetectionTest()