]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/device.cpp
Use nullptr in place of 0 or NULL
[libs/gui.git] / source / input / device.cpp
index d5b3b864af3c854d42de216196ab42a17952a364..b615cb7fb92fe870ede98effec9ed505db4ed848 100644 (file)
@@ -1,5 +1,5 @@
-#include <msp/strings/format.h>
 #include "device.h"
+#include <msp/strings/format.h>
 
 using namespace std;
 
@@ -15,12 +15,12 @@ Device::~Device()
 
 Device *Device::find_subdevice(const string &n)
 {
-       return (n==name ? this : 0);
+       return (n==name ? this : nullptr);
 }
 
 Device *Device::find_subdevice(DeviceType t, unsigned i)
 {
-       return (t==type && i==0 ? this : 0);
+       return (t==type && i==0 ? this : nullptr);
 }
 
 bool Device::get_button_state(unsigned btn) const
@@ -39,12 +39,12 @@ float Device::get_axis_value(unsigned axis) const
        return axes[axis];
 }
 
-std::string Device::get_button_name(unsigned btn) const
+string Device::get_button_name(unsigned btn) const
 {
        return format("Button %d", btn);
 }
 
-std::string Device::get_axis_name(unsigned axis) const
+string Device::get_axis_name(unsigned axis) const
 {
        return format("Axis %d", axis);
 }