]> sigrok.org Git - pulseview.git/commitdiff
Replaced NULL with nullptr
authorJoel Holdsworth <redacted>
Sun, 12 Apr 2015 14:54:29 +0000 (15:54 +0100)
committerUwe Hermann <redacted>
Thu, 11 Jun 2015 18:38:48 +0000 (20:38 +0200)
32 files changed:
HACKING
android/loghandler.cpp
main.cpp
pv/binding/decoder.cpp
pv/data/decode/decoder.cpp
pv/data/decode/row.cpp
pv/data/decode/row.hpp
pv/data/decoderstack.cpp
pv/data/logicsegment.cpp
pv/mainwindow.hpp
pv/popups/channels.cpp
pv/prop/bool.cpp
pv/prop/double.cpp
pv/prop/enum.cpp
pv/prop/int.cpp
pv/prop/string.cpp
pv/toolbars/mainbar.cpp
pv/view/decodetrace.cpp
pv/view/logicsignal.cpp
pv/view/rowitem.cpp
pv/view/signal.cpp
pv/view/timemarker.cpp
pv/view/trace.cpp
pv/view/tracegroup.cpp
pv/view/viewitem.cpp
pv/widgets/decodergroupbox.hpp
pv/widgets/popuptoolbutton.cpp
pv/widgets/sweeptimingwidget.hpp
signalhandler.hpp
test/data/analogsegment.cpp
test/data/decoderstack.cpp
test/data/logicsegment.cpp

diff --git a/HACKING b/HACKING
index d1edc8715673d26f5d6dc7a858a7137d7fbaf724..17183ed147be9749b375bf4a7d7d32c3c85885a6 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -38,7 +38,7 @@ Random notes
    glib's g_try_malloc()/g_try_malloc0() was used, use g_free() to free the
    memory. Otherwise use standard free(). Never use the wrong function!
 
- - Never use g_malloc() or g_malloc0(). These functions do not return NULL
+ - Never use g_malloc() or g_malloc0(). These functions do not return nullptr
    if not enough memory is available but rather lead to an exit() or segfault
    instead. This behaviour is not acceptable.
    Use g_try_malloc()/g_try_malloc0() instead and check the return value.
index 0b99b049d36bde0b67806e4f555fa028001488f9..2c6674cda51cdcd6a398198525c301a24acf3462 100644 (file)
@@ -94,9 +94,9 @@ int AndroidLogHandler::srd_callback(void *cb_data, int loglevel, const char *for
 
 void AndroidLogHandler::install_callbacks()
 {
-       sr_log_callback_set(sr_callback, NULL);
+       sr_log_callback_set(sr_callback, nullptr);
 #ifdef ENABLE_DECODE
-       srd_log_callback_set(srd_callback, NULL);
+       srd_log_callback_set(srd_callback, nullptr);
 #endif
 }
 
index 089deee756db87024ef5fe698a8be7335726debc..285c1535f3c20898307923de6c49ad08bcbfc899 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
                };
 
                const int c = getopt_long(argc, argv,
-                       "l:Vh?", long_options, NULL);
+                       "l:Vh?", long_options, nullptr);
                if (c == -1)
                        break;
 
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
 
 #ifdef ENABLE_DECODE
                // Initialise libsigrokdecode
-               if (srd_init(NULL) != SRD_OK) {
+               if (srd_init(nullptr) != SRD_OK) {
                        qDebug() << "ERROR: libsigrokdecode init failed.";
                        break;
                }
index dd5716027aeb492d47ab298c3f506f7f028148cc..28cc30d668e94deddc71ca6f28b8f3645daa5cee 100644 (file)
@@ -106,7 +106,7 @@ shared_ptr<Property> Decoder::bind_enum(
 
 Glib::VariantBase Decoder::getter(const char *id)
 {
-       GVariant *val = NULL;
+       GVariant *val = nullptr;
 
        assert(decoder_);
 
index 35840909b9b5b543a20c8e430d9bb6387b514883..018051df0fccc0182a92fb9ce6727aa9303863a0 100644 (file)
@@ -129,7 +129,7 @@ srd_decoder_inst* Decoder::create_decoder_inst(srd_session *session, int unit_si
        g_hash_table_destroy(opt_hash);
 
        if(!decoder_inst)
-               return NULL;
+               return nullptr;
 
        // Setup the channels
        GHashTable *const channels = g_hash_table_new_full(g_str_hash,
index e36051c36f3947cd3fbb26e3f3750a3b83a31749..70a060938aedb11642ae2eb8e7526ac8054d295c 100644 (file)
@@ -27,8 +27,8 @@ namespace data {
 namespace decode {
 
 Row::Row() :
-       decoder_(NULL),
-       row_(NULL)
+       decoder_(nullptr),
+       row_(nullptr)
 {
 }
 
index 6413e78808bb0de907c83a89c5e0e6073a060e89..9c81b8715a44c8844047e3e4bb3631bcfc37ffd5 100644 (file)
@@ -38,7 +38,7 @@ public:
        Row();
 
        Row(const srd_decoder *decoder,
-               const srd_decoder_annotation_row *row = NULL);
+               const srd_decoder_annotation_row *row = nullptr);
 
        const srd_decoder* decoder() const;
        const srd_decoder_annotation_row* row() const;
index 912d98c7bc4cda8fc364aaf76e75f9ca23584193..7c1982bd707aeec31b46735b80f88f2c17d1215b 100644 (file)
@@ -334,7 +334,7 @@ void DecoderStack::decode_proc()
 {
        optional<int64_t> sample_count;
        srd_session *session;
-       srd_decoder_inst *prev_di = NULL;
+       srd_decoder_inst *prev_di = nullptr;
 
        assert(segment_);
 
index e56a8371093555ef66b5d3804c8c8f4fdf284d0c..30e4e67dcecced37fa8267b489c9364363e1223a 100644 (file)
@@ -306,7 +306,7 @@ void LogicSegment::get_subsampled_edges(
 
                // We cannot fast-forward if there is no mip-map data at
                // at the minimum level.
-               fast_forward = (mip_map_[level].data != NULL);
+               fast_forward = (mip_map_[level].data != nullptr);
 
                if (min_length < MipMapScaleFactor)
                {
index 99772e3d0037aad26ca983fefb1ca00242b46d5b..a6b2c89831ab60ab6796297918bce86eb3277430 100644 (file)
@@ -78,7 +78,7 @@ private:
 
 public:
        explicit MainWindow(DeviceManager &device_manager,
-               const char *open_file_name = NULL,
+               const char *open_file_name = nullptr,
                QWidget *parent = 0);
 
        QAction* action_open() const;
index 3ad494d31660fb17953ad8e7b110f4221868d79b..d4ff6c9797cf6262a89b97df74b2dd65c7de05b3 100644 (file)
@@ -110,7 +110,7 @@ Channels::Channels(Session &session, QWidget *parent) :
        }
 
        // Create a group
-       populate_group(NULL, global_sigs);
+       populate_group(nullptr, global_sigs);
 
        // Create the enable/disable all buttons
        connect(&enable_all_channels_, SIGNAL(clicked()),
index e3e0ebd50e86151408b14fe7420167a2e2db054a..3e201cc4c6a1ffc8bdec2b940a8686fef9dc5e94 100644 (file)
@@ -29,7 +29,7 @@ namespace prop {
 
 Bool::Bool(QString name, Getter getter, Setter setter) :
        Property(name, getter, setter),
-       check_box_(NULL)
+       check_box_(nullptr)
 {
 }
 
@@ -43,11 +43,11 @@ QWidget* Bool::get_widget(QWidget *parent, bool auto_commit)
                return check_box_;
 
        if (!getter_)
-               return NULL;
+               return nullptr;
 
        Glib::VariantBase variant = getter_();
        if (!variant.gobj())
-               return NULL;
+               return nullptr;
 
        bool value = Glib::VariantBase::cast_dynamic<Glib::Variant<bool>>(
                variant).get();
index d059755843112be79d6e014672f05e0e31feb806..c5ab1db4e28b5a83b98f33f030fc0124b4bef727 100644 (file)
@@ -42,7 +42,7 @@ Double::Double(QString name,
        suffix_(suffix),
        range_(range),
        step_(step),
-       spin_box_(NULL)
+       spin_box_(nullptr)
 {
 }
 
@@ -56,11 +56,11 @@ QWidget* Double::get_widget(QWidget *parent, bool auto_commit)
                return spin_box_;
 
        if (!getter_)
-               return NULL;
+               return nullptr;
 
        Glib::VariantBase variant = getter_();
        if (!variant.gobj())
-               return NULL;
+               return nullptr;
 
        double value = Glib::VariantBase::cast_dynamic<Glib::Variant<double>>(
                variant).get();
index 6717101b9288f51d66f0c294a95def76590a14f0..06e4d76f1098e5f6967b57eeee81ba591d72de45 100644 (file)
@@ -35,7 +35,7 @@ Enum::Enum(QString name,
        Getter getter, Setter setter) :
        Property(name, getter, setter),
        values_(values),
-       selector_(NULL)
+       selector_(nullptr)
 {
 }
 
@@ -49,11 +49,11 @@ QWidget* Enum::get_widget(QWidget *parent, bool auto_commit)
                return selector_;
 
        if (!getter_)
-               return NULL;
+               return nullptr;
 
        Glib::VariantBase variant = getter_();
        if (!variant.gobj())
-               return NULL;
+               return nullptr;
 
        selector_ = new QComboBox(parent);
        for (unsigned int i = 0; i < values_.size(); i++) {
index 55b7ab3e09fa8bd4f00cb37ff4886a5f795d7fb3..31f518a8cbd481467d0e5195861058989574ae28 100644 (file)
@@ -41,7 +41,7 @@ Int::Int(QString name,
        Property(name, getter, setter),
        suffix_(suffix),
        range_(range),
-       spin_box_(NULL)
+       spin_box_(nullptr)
 {
 }
 
@@ -57,13 +57,13 @@ QWidget* Int::get_widget(QWidget *parent, bool auto_commit)
                return spin_box_;
 
        if (!getter_)
-               return NULL;
+               return nullptr;
 
        value_ = getter_();
 
        GVariant *value = value_.gobj();
        if (!value)
-               return NULL;
+               return nullptr;
 
        spin_box_ = new QSpinBox(parent);
        spin_box_->setSuffix(suffix_);
@@ -141,7 +141,7 @@ void Int::commit()
        if (!spin_box_)
                return;
 
-       GVariant *new_value = NULL;
+       GVariant *new_value = nullptr;
        const GVariantType *const type = g_variant_get_type(value_.gobj());
        assert(type);
 
index b8ecf738630bdea67568e9781357211145215db8..e7af45973cc92950aef95c8c4ba50d0357b8132b 100644 (file)
@@ -36,7 +36,7 @@ String::String(QString name,
        Getter getter,
        Setter setter) :
        Property(name, getter, setter),
-       line_edit_(NULL)
+       line_edit_(nullptr)
 {
 }
 
@@ -46,11 +46,11 @@ QWidget* String::get_widget(QWidget *parent, bool auto_commit)
                return line_edit_;
 
        if (!getter_)
-               return NULL;
+               return nullptr;
 
        Glib::VariantBase variant = getter_();
        if (!variant.gobj())
-               return NULL;
+               return nullptr;
 
        string value = Glib::VariantBase::cast_dynamic<Glib::Variant<ustring>>(
                variant).get();
index 8c2be4686b29075711e1c1a5926855518f8aed8f..5518e98b6a9ce6466515c4e14558f0656cdcb2e1 100644 (file)
@@ -71,7 +71,7 @@ MainBar::MainBar(Session &session, MainWindow &main_window) :
        device_selector_(this, session.device_manager(),
                main_window.action_connect()),
        configure_button_(this),
-       configure_button_action_(NULL),
+       configure_button_action_(nullptr),
        channels_button_(this),
        sample_count_(" samples", this),
        sample_rate_("Hz", this),
@@ -231,7 +231,7 @@ void MainBar::update_sample_rate_selector()
 {
        Glib::VariantContainerBase gvar_dict;
        GVariant *gvar_list;
-       const uint64_t *elements = NULL;
+       const uint64_t *elements = nullptr;
        gsize num_elements;
        map< const ConfigKey*, std::set<Capability> > keys;
 
index 4af65f5488ec2b60f0f347e18389d307c0d04e9c..8674f40ca405ca2c5833cc708e278015839b2811 100644 (file)
@@ -717,7 +717,7 @@ QComboBox* DecodeTrace::create_channel_selector(
 
        QComboBox *selector = new QComboBox(parent);
 
-       selector->addItem("-", qVariantFromValue((void*)NULL));
+       selector->addItem("-", qVariantFromValue((void*)nullptr));
 
        if (channel_iter == dec->channels().end())
                selector->setCurrentIndex(0);
index 58eaac9317c3694625d0757eb5cf2264ea9a5918..49d1263642b9b97ee3bac15c95fbe8a897e2f724 100644 (file)
@@ -105,12 +105,12 @@ LogicSignal::LogicSignal(
        Signal(session, channel),
        device_(device),
        data_(data),
-       trigger_none_(NULL),
-       trigger_rising_(NULL),
-       trigger_high_(NULL),
-       trigger_falling_(NULL),
-       trigger_low_(NULL),
-       trigger_change_(NULL)
+       trigger_none_(nullptr),
+       trigger_rising_(nullptr),
+       trigger_high_(nullptr),
+       trigger_falling_(nullptr),
+       trigger_low_(nullptr),
+       trigger_change_(nullptr)
 {
        shared_ptr<Trigger> trigger;
 
index 3a002bbc2a4eedf601d69114da62cfd68879f976..07540c1b157437375a3e3ce95bb97eaee8e7a152 100644 (file)
@@ -28,7 +28,7 @@ namespace pv {
 namespace view {
 
 RowItem::RowItem() :
-       owner_(NULL),
+       owner_(nullptr),
        layout_v_offset_(0),
        visual_v_offset_(0),
        v_offset_animation_(this, "visual_v_offset")
index bbabcc1b7709d62818a280d76c5f5ee887f95e4f..1896bba2c4a177ca26af309b005793be6dbbfc03 100644 (file)
@@ -63,7 +63,7 @@ Signal::Signal(pv::Session &session,
        Trace(QString::fromUtf8(channel->name().c_str())),
        session_(session),
        channel_(channel),
-       name_widget_(NULL),
+       name_widget_(nullptr),
        updating_name_widget_(false)
 {
        assert(channel_);
index 1e5b8206e54165ebc3cc36e20181eef686c422ce..e4ef3c0e1cb5edff4a2765484ca93a3697431369 100644 (file)
@@ -45,8 +45,8 @@ TimeMarker::TimeMarker(View &view, const QColor &colour, double time) :
        TimeItem(view),
        colour_(colour),
        time_(time),
-       value_action_(NULL),
-       value_widget_(NULL),
+       value_action_(nullptr),
+       value_widget_(nullptr),
        updating_value_widget_(false)
 {
 }
index 8e3927848ae64d271619444e2dae89b462d20e5f..729b0b4c1588ff6ae93cc5c152dbdcd2e46994cc 100644 (file)
@@ -43,8 +43,8 @@ const int Trace::LabelHitPadding = 2;
 
 Trace::Trace(QString name) :
        name_(name),
-       popup_(NULL),
-       popup_form_(NULL)
+       popup_(nullptr),
+       popup_form_(nullptr)
 {
 }
 
@@ -219,8 +219,8 @@ void Trace::populate_popup_form(QWidget *parent, QFormLayout *form)
 
 void Trace::on_popup_closed()
 {
-       popup_ = NULL;
-       popup_form_ = NULL;
+       popup_ = nullptr;
+       popup_form_ = nullptr;
 }
 
 void Trace::on_text_changed(const QString &text)
index b155778b37e354d99c2c6eb842faa7a3a887f8be..74221d440a15331a0ac657cadab0b3cf88b8399d 100644 (file)
@@ -147,7 +147,7 @@ QMenu* TraceGroup::create_context_menu(QWidget *parent)
 pv::widgets::Popup* TraceGroup::create_popup(QWidget *parent)
 {
        (void)parent;
-       return NULL;
+       return nullptr;
 }
 
 int TraceGroup::owner_visual_v_offset() const
index 1492d14d8d1d45851769dadb6f9af9278c50ae98..55243860c0f4b342c86238fb9bae3f07968acf29 100644 (file)
@@ -33,7 +33,7 @@ const QSizeF ViewItem::LabelPadding(4, 0);
 const int ViewItem::HighlightRadius = 3;
 
 ViewItem::ViewItem() :
-       context_parent_(NULL),
+       context_parent_(nullptr),
        drag_point_(INT_MIN, INT_MIN),
        selected_(false)
 {
index 09c83f27e81ce85b4f37ccf964b57c1ed158a7c8..73bc9971b68bbf90e848569b680422467ce5232f 100644 (file)
@@ -34,7 +34,7 @@ class DecoderGroupBox : public QWidget
        Q_OBJECT
 
 public:
-       DecoderGroupBox(QString title, QWidget *parent = NULL);
+       DecoderGroupBox(QString title, QWidget *parent = nullptr);
 
        void add_layout(QLayout *layout);
 
index 75aa76a552777e2fe44aa056cd7f8711f401e9e5..5153eee55ad53d547600e70fd7d2b2a04437e6a3 100644 (file)
@@ -27,7 +27,7 @@ namespace widgets {
 
 PopupToolButton::PopupToolButton(QWidget *parent) :
        QToolButton(parent),
-       popup_(NULL)
+       popup_(nullptr)
 {
        connect(this, SIGNAL(clicked(bool)), this, SLOT(on_clicked(bool)));
 }
index d760a79d8fdab3bd95b38264e2572d176f0ae6e7..e9e4dcff9d5e05c898447670800d575d7872e11d 100644 (file)
@@ -45,7 +45,7 @@ private:
        };
 
 public:
-       SweepTimingWidget(const char *suffix, QWidget *parent = NULL);
+       SweepTimingWidget(const char *suffix, QWidget *parent = nullptr);
 
        void show_none();
        void show_min_max_step(uint64_t min, uint64_t max, uint64_t step);
index fff9efc7a1cf6fda5f31d42d2feeea9c84034cda..a8ddccb30bf2fbb1f36fb9c359d79c94ac8df359 100644 (file)
@@ -33,7 +33,7 @@ public:
        static bool prepare_signals();
 
 public:
-       explicit SignalHandler(QObject* parent = NULL);
+       explicit SignalHandler(QObject* parent = nullptr);
 
 Q_SIGNALS:
        void int_received();
index fd7b887085acdf5acb8f8de7dd71db08be7137cb..2593bf67f1e0e4dfe43bcabf061a974ff55e1a5b 100644 (file)
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(Basic)
                const AnalogSegment::Envelope &m = s.envelope_levels_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.samples == NULL);
+               BOOST_CHECK(m.samples == nullptr);
        }
 
        // Push 8 samples of all zeros
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(Basic)
                const AnalogSegment::Envelope &m = s.envelope_levels_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.samples == NULL);
+               BOOST_CHECK(m.samples == nullptr);
        }
 
        // Push 8 samples of 1.0s to bring the total up to 16
@@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(Basic)
        const AnalogSegment::Envelope &e0 = s.envelope_levels_[0];
        BOOST_CHECK_EQUAL(e0.length, 1);
        BOOST_CHECK_EQUAL(e0.data_length, AnalogSegment::EnvelopeDataUnit);
-       BOOST_REQUIRE(e0.samples != NULL);
+       BOOST_REQUIRE(e0.samples != nullptr);
        BOOST_CHECK_EQUAL(e0.samples[0].min, 0.0f);
        BOOST_CHECK_EQUAL(e0.samples[0].max, 1.0f);
 
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(Basic)
                const AnalogSegment::Envelope &m = s.envelope_levels_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.samples == NULL);
+               BOOST_CHECK(m.samples == nullptr);
        }
 
        // Push 240 samples of all zeros to bring the total up to 256
@@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(Basic)
        const AnalogSegment::Envelope &e1 = s.envelope_levels_[1];
        BOOST_CHECK_EQUAL(e1.length, 1);
        BOOST_CHECK_EQUAL(e1.data_length, AnalogSegment::EnvelopeDataUnit);
-       BOOST_REQUIRE(e1.samples != NULL);
+       BOOST_REQUIRE(e1.samples != nullptr);
        BOOST_CHECK_EQUAL(e1.samples[0].min, -1.0f);
        BOOST_CHECK_EQUAL(e1.samples[0].max, 1.0f);
 }
index 96f8b4a0ee4ebf6bb41200a269bf871ead274d3c..70ed7e03695c434e5b31bec049a468c1e8ee3ac2 100644 (file)
@@ -39,12 +39,12 @@ BOOST_AUTO_TEST_SUITE(DecoderStackTest)
 
 BOOST_AUTO_TEST_CASE(TwoDecoderStack)
 {
-       sr_context *ctx = NULL;
+       sr_context *ctx = nullptr;
 
        BOOST_REQUIRE(sr_init(&ctx) == SR_OK);
        BOOST_REQUIRE(ctx);
 
-       BOOST_REQUIRE(srd_init(NULL) == SRD_OK);
+       BOOST_REQUIRE(srd_init(nullptr) == SRD_OK);
 
        srd_decoder_load_all();
 
index 29bffdda47c3801876157eb2b679186fccd3a232..fabcbd404ddb06a5a2703ad838507c890f6d607f 100644 (file)
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(Basic)
        sr_datafeed_logic logic;
        logic.length = 0;
        logic.unitsize = 1;
-       logic.data = NULL;
+       logic.data = nullptr;
 
        LogicSegment s(logic);
 
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(Basic)
                const LogicSegment::MipMapLevel &m = s.mip_map_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.data == NULL);
+               BOOST_CHECK(m.data == nullptr);
        }
 
        // Push 8 samples of all zeros
@@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE(Basic)
                const LogicSegment::MipMapLevel &m = s.mip_map_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.data == NULL);
+               BOOST_CHECK(m.data == nullptr);
        }
 
        // Push 8 samples of 0x11s to bring the total up to 16
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(Basic)
        const LogicSegment::MipMapLevel &m0 = s.mip_map_[0];
        BOOST_CHECK_EQUAL(m0.length, 1);
        BOOST_CHECK_EQUAL(m0.data_length, LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(m0.data != NULL);
+       BOOST_REQUIRE(m0.data != nullptr);
        BOOST_CHECK_EQUAL(((uint8_t*)m0.data)[0], 0x11);
 
        // The higher levels should still be empty
@@ -120,7 +120,7 @@ BOOST_AUTO_TEST_CASE(Basic)
                const LogicSegment::MipMapLevel &m = s.mip_map_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.data == NULL);
+               BOOST_CHECK(m.data == nullptr);
        }
 
        // Push 240 samples of all zeros to bring the total up to 256
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE(Basic)
        const LogicSegment::MipMapLevel &m1 = s.mip_map_[1];
        BOOST_CHECK_EQUAL(m1.length, 1);
        BOOST_CHECK_EQUAL(m1.data_length, LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(m1.data != NULL);
+       BOOST_REQUIRE(m1.data != nullptr);
        BOOST_CHECK_EQUAL(((uint8_t*)m1.data)[0], 0x11);
 
        //----- Test LogicSegment::get_subsampled_edges -----//
@@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE(LargeData)
        BOOST_CHECK_EQUAL(s.mip_map_[0].length, 62500);
        BOOST_CHECK_EQUAL(s.mip_map_[0].data_length,
                LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(s.mip_map_[0].data != NULL);
+       BOOST_REQUIRE(s.mip_map_[0].data != nullptr);
 
        prev_sample = 0;
        for (unsigned int i = 0; i < s.mip_map_[0].length;)
@@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE(LargeData)
        BOOST_CHECK_EQUAL(s.mip_map_[1].length, 3906);
        BOOST_CHECK_EQUAL(s.mip_map_[1].data_length,
                LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(s.mip_map_[1].data != NULL);
+       BOOST_REQUIRE(s.mip_map_[1].data != nullptr);
 
        prev_sample = 0;
        for (unsigned int i = 0; i < s.mip_map_[1].length; i++)
@@ -226,7 +226,7 @@ BOOST_AUTO_TEST_CASE(LargeData)
        BOOST_CHECK_EQUAL(s.mip_map_[2].length, 244);
        BOOST_CHECK_EQUAL(s.mip_map_[2].data_length,
                LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(s.mip_map_[2].data != NULL);
+       BOOST_REQUIRE(s.mip_map_[2].data != nullptr);
 
        prev_sample = 0;
        for (unsigned int i = 0; i < s.mip_map_[2].length; i++)
@@ -244,7 +244,7 @@ BOOST_AUTO_TEST_CASE(LargeData)
        BOOST_CHECK_EQUAL(s.mip_map_[3].length, 15);
        BOOST_CHECK_EQUAL(s.mip_map_[3].data_length,
                LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(s.mip_map_[3].data != NULL);
+       BOOST_REQUIRE(s.mip_map_[3].data != nullptr);
 
        for (unsigned int i = 0; i < s.mip_map_[3].length; i++)
                BOOST_CHECK_EQUAL(*((uint8_t*)s.mip_map_[3].data + i),
@@ -256,7 +256,7 @@ BOOST_AUTO_TEST_CASE(LargeData)
                const LogicSegment::MipMapLevel &m = s.mip_map_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.data == NULL);
+               BOOST_CHECK(m.data == nullptr);
        }
 
        //----- Test LogicSegment::get_subsampled_edges -----//
@@ -310,7 +310,7 @@ BOOST_AUTO_TEST_CASE(Pulses)
        BOOST_CHECK_EQUAL(s.mip_map_[0].length, 12);
        BOOST_CHECK_EQUAL(s.mip_map_[0].data_length,
                LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(s.mip_map_[0].data != NULL);
+       BOOST_REQUIRE(s.mip_map_[0].data != nullptr);
 
        for (unsigned int i = 0; i < s.mip_map_[0].length;) {
                BOOST_TEST_MESSAGE("Testing mip_map[0].data[" << i << "]");
@@ -330,7 +330,7 @@ BOOST_AUTO_TEST_CASE(Pulses)
                const LogicSegment::MipMapLevel &m = s.mip_map_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.data == NULL);
+               BOOST_CHECK(m.data == nullptr);
        }
 
        //----- Test get_subsampled_edges at reduced scale -----//
@@ -374,7 +374,7 @@ BOOST_AUTO_TEST_CASE(LongPulses)
        BOOST_CHECK_EQUAL(s.mip_map_[0].length, 12);
        BOOST_CHECK_EQUAL(s.mip_map_[0].data_length,
                LogicSegment::MipMapDataUnit);
-       BOOST_REQUIRE(s.mip_map_[0].data != NULL);
+       BOOST_REQUIRE(s.mip_map_[0].data != nullptr);
 
        for (unsigned int i = 0; i < s.mip_map_[0].length;) {
                for (j = 0; i < s.mip_map_[0].length && j < 2; j++) {
@@ -396,7 +396,7 @@ BOOST_AUTO_TEST_CASE(LongPulses)
                const LogicSegment::MipMapLevel &m = s.mip_map_[i];
                BOOST_CHECK_EQUAL(m.length, 0);
                BOOST_CHECK_EQUAL(m.data_length, 0);
-               BOOST_CHECK(m.data == NULL);
+               BOOST_CHECK(m.data == nullptr);
        }
 
        //----- Test get_subsampled_edges at a full scale -----//