SerialBusConnection: Use member initialization

And as we have full C++11 support, so its also preferred to use nullptr.
This commit is contained in:
Andre Hartmann
2017-11-25 17:27:47 +01:00
parent 84cb598a0d
commit d69947bf2f
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -13,7 +13,6 @@
SerialBusConnection::SerialBusConnection(QString portName) :
CANConnection(portName, CANCon::SOCKETCAN, 1, 4000, true),
mDev_p(NULL),
mTimer(this) /*NB: set connection as parent of timer to manage it from working thread */
{
}
@@ -135,7 +134,7 @@ void SerialBusConnection::disconnectDevice() {
if(mDev_p) {
mDev_p->disconnectDevice();
delete mDev_p;
mDev_p = Q_NULLPTR;
mDev_p = nullptr;
}
}