]> sigrok.org Git - pulseview.git/blobdiff - pv/prop/enum.cpp
Use the 'default' keyword where applicable. This patch
[pulseview.git] / pv / prop / enum.cpp
index 473e3d5f1a3ad36582a3d5c770d4793f607b6124..71ed19e6e2c12de2ff5cc4900417e8a46cd0357d 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <QComboBox>
 
-#include "enum.h"
+#include "enum.hpp"
 
 using std::pair;
 using std::vector;
@@ -35,11 +35,7 @@ Enum::Enum(QString name,
        Getter getter, Setter setter) :
        Property(name, getter, setter),
        values_(values),
-       selector_(NULL)
-{
-}
-
-Enum::~Enum()
+       selector_(nullptr)
 {
 }
 
@@ -49,11 +45,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++) {