]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/smoothcontrol.cpp
Use nullptr in place of 0 or NULL
[libs/gui.git] / source / input / smoothcontrol.cpp
index c9d0a3c5d69b8b3b0cce4e7720ca9a4303c6c0bb..0532aef68ca66d62dc6d38808da0a08c07529eb9 100644 (file)
@@ -6,32 +6,17 @@ using namespace std;
 namespace Msp {
 namespace Input {
 
-SmoothControl::SmoothControl():
-       value(0),
-       paired_ctrl(0),
-       dead_zone(0.1),
-       threshold(0.9)
-{ }
-
 SmoothControl::SmoothControl(const ControlSource &s):
-       Control(s),
-       value(0),
-       paired_ctrl(0),
-       dead_zone(0.1),
-       threshold(0.9)
+       Control(s)
 { }
 
 SmoothControl::SmoothControl(Device &d, ControlSrcType t, unsigned i):
-       Control(d, t, i),
-       value(0),
-       paired_ctrl(0),
-       dead_zone(0.1),
-       threshold(0.9)
+       Control(d, t, i)
 { }
 
 SmoothControl::~SmoothControl()
 {
-       pair(0);
+       pair(nullptr);
 }
 
 void SmoothControl::set_dead_zone(float d)
@@ -64,8 +49,8 @@ void SmoothControl::pair(SmoothControl *ctrl)
        if(paired_ctrl)
        {
                SmoothControl *old_pair = paired_ctrl;
-               paired_ctrl = 0;
-               old_pair->pair(0);
+               paired_ctrl = nullptr;
+               old_pair->pair(nullptr);
        }
 
        paired_ctrl = ctrl;