]> sigrok.org Git - pulseview.git/blobdiff - pv/prop/enum.cpp
Don't use deprecated headers.
[pulseview.git] / pv / prop / enum.cpp
index 6717101b9288f51d66f0c294a95def76590a14f0..9e4fcd0e35dd706baf15bb65e463a5e5e5bdb8da 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <assert.h>
+#include <cassert>
 
 #include <QComboBox>
 
@@ -35,11 +34,7 @@ Enum::Enum(QString name,
        Getter getter, Setter setter) :
        Property(name, getter, setter),
        values_(values),
-       selector_(NULL)
-{
-}
-
-Enum::~Enum()
+       selector_(nullptr)
 {
 }
 
@@ -49,11 +44,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++) {