Apply modernize-use-nullptr
Setup: - `mkdir tidy; cd tidy` - `cmake .. -DCMAKE_BUILD_TYPE=debug -DPROC_TARGET_NUMBER=1 -DCACHE_NAME_SUFFIX=4 -DBINDIR=. -DDATADIR=. -DBUILD_BUNDLE=ON -DWITH_LTO=OFF -DOPTION_OMP=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` - `cd ..` - `find -name '*.cc' -exec clang-tidy-3.8 -header-filter=.* -p=tidy -fix-errors -checks=modernize-use-nullptr {} \;`
This commit is contained in:
@@ -473,9 +473,9 @@ void MyExpander::init()
|
||||
}
|
||||
|
||||
MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) :
|
||||
enabled(false), inconsistent(false), flushEvent(false), expBox(NULL),
|
||||
child(NULL), headerWidget(NULL), statusImage(NULL),
|
||||
label(NULL), useEnabled(useEnabled)
|
||||
enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr),
|
||||
child(nullptr), headerWidget(nullptr), statusImage(nullptr),
|
||||
label(nullptr), useEnabled(useEnabled)
|
||||
{
|
||||
set_spacing(options.slimUI ? 0 : 2);
|
||||
set_name("MyExpander");
|
||||
@@ -520,9 +520,9 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) :
|
||||
}
|
||||
|
||||
MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) :
|
||||
enabled(false), inconsistent(false), flushEvent(false), expBox(NULL),
|
||||
child(NULL), headerWidget(NULL), statusImage(NULL),
|
||||
label(NULL), useEnabled(useEnabled)
|
||||
enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr),
|
||||
child(nullptr), headerWidget(nullptr), statusImage(nullptr),
|
||||
label(nullptr), useEnabled(useEnabled)
|
||||
{
|
||||
set_spacing(options.slimUI ? 0 : 2);
|
||||
set_name("MyExpander");
|
||||
@@ -1024,8 +1024,8 @@ void bindCurrentFolder (Gtk::FileChooser& chooser, Glib::ustring& variable)
|
||||
TextOrIcon::TextOrIcon (Glib::ustring fname, Glib::ustring labelTx, Glib::ustring tooltipTx, TOITypes type)
|
||||
{
|
||||
|
||||
imgIcon = 0;
|
||||
label = 0;
|
||||
imgIcon = nullptr;
|
||||
label = nullptr;
|
||||
filename = fname;
|
||||
labelText = labelTx;
|
||||
tooltipText = tooltipTx;
|
||||
@@ -1051,7 +1051,7 @@ void TextOrIcon::switchTo(TOITypes type)
|
||||
if (!imgIcon) {
|
||||
removeIfThere(this, label, false);
|
||||
delete label;
|
||||
label = 0;
|
||||
label = nullptr;
|
||||
imgIcon = new RTImage (filename);
|
||||
pack_start(*imgIcon, Gtk::PACK_SHRINK, 0);
|
||||
set_tooltip_markup ("<span font_size=\"large\" font_weight=\"bold\">" + labelText + "</span>\n" + tooltipText);
|
||||
@@ -1065,7 +1065,7 @@ void TextOrIcon::switchTo(TOITypes type)
|
||||
if (!label) {
|
||||
removeIfThere(this, imgIcon, false);
|
||||
delete imgIcon;
|
||||
imgIcon = 0;
|
||||
imgIcon = nullptr;
|
||||
label = new Gtk::Label (labelText, Gtk::ALIGN_CENTER);
|
||||
pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0);
|
||||
set_tooltip_markup (tooltipText);
|
||||
|
Reference in New Issue
Block a user