[dss-commits] r8874 - in dss/trunk: core unix
dss-commits at forum.digitalstrom.org
dss-commits at forum.digitalstrom.org
Thu Oct 29 10:17:23 CET 2009
Author: pstaehlin
Date: 2009-10-29 10:17:23 +0100 (Thu, 29 Oct 2009)
New Revision: 8874
Modified:
dss/trunk/core/event.cpp
dss/trunk/core/propertysystem.cpp
dss/trunk/core/subsystem.cpp
dss/trunk/unix/ds485.cpp
dss/trunk/unix/ds485proxy.cpp
Log:
Removed uses of boost::shared_ptr<>.get() == NULL
Modified: dss/trunk/core/event.cpp
===================================================================
--- dss/trunk/core/event.cpp 2009-10-29 09:17:18 UTC (rev 8873)
+++ dss/trunk/core/event.cpp 2009-10-29 09:17:23 UTC (rev 8874)
@@ -384,7 +384,7 @@
}
try {
XMLNode& paramNode = _node.getChildByName("parameter");
- if(opts.get() == NULL) {
+ if(opts == NULL) {
opts.reset(new SubscriptionOptions());
}
opts->loadParameterFromXML(paramNode);
Modified: dss/trunk/core/propertysystem.cpp
===================================================================
--- dss/trunk/core/propertysystem.cpp 2009-10-29 09:17:18 UTC (rev 8873)
+++ dss/trunk/core/propertysystem.cpp 2009-10-29 09:17:23 UTC (rev 8874)
@@ -352,7 +352,7 @@
if(_childNode.get() == this) {
throw std::runtime_error("Adding self as child node");
}
- if(_childNode.get() == NULL) {
+ if(_childNode == NULL) {
throw std::runtime_error("Adding NULL as child node");
}
if(_childNode->m_ParentNode != NULL) {
Modified: dss/trunk/core/subsystem.cpp
===================================================================
--- dss/trunk/core/subsystem.cpp 2009-10-29 09:17:18 UTC (rev 8873)
+++ dss/trunk/core/subsystem.cpp 2009-10-29 09:17:23 UTC (rev 8874)
@@ -86,7 +86,7 @@
}
int Subsystem::getLogSeverity() const {
- if(m_pLogChannel.get() == NULL) {
+ if(m_pLogChannel == NULL) {
return 0;
} else {
return m_pLogChannel->getMinimumSeverity();
Modified: dss/trunk/unix/ds485.cpp
===================================================================
--- dss/trunk/unix/ds485.cpp 2009-10-29 09:17:18 UTC (rev 8873)
+++ dss/trunk/unix/ds485.cpp 2009-10-29 09:17:23 UTC (rev 8874)
@@ -312,7 +312,7 @@
doChangeState(csCommError);
continue;
}
- if(frame.get() == NULL) {
+ if(frame == NULL) {
if(m_State != csDesignatedMaster) {
std::cout << "§";
missedFramesCounter++;
Modified: dss/trunk/unix/ds485proxy.cpp
===================================================================
--- dss/trunk/unix/ds485proxy.cpp 2009-10-29 09:17:18 UTC (rev 8873)
+++ dss/trunk/unix/ds485proxy.cpp 2009-10-29 09:17:23 UTC (rev 8874)
@@ -636,7 +636,7 @@
std::vector<ModulatorSpec_t> result;
while(true) {
boost::shared_ptr<ReceivedFrame> recFrame = bucket->popFrame();
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
break;
}
int source = recFrame->getFrame()->getHeader().getSource();
@@ -661,7 +661,7 @@
boost::shared_ptr<ReceivedFrame> recFrame = receiveSingleFrame(cmdFrame, FunctionGetTypeRequest);
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
throw DS485ApiError("No frame received");
}
@@ -773,7 +773,7 @@
while(true) {
boost::shared_ptr<ReceivedFrame> recFrame = bucket->popFrame();
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
break;
}
@@ -912,7 +912,7 @@
log("Proxy: GetDSIDOfDevice");
boost::shared_ptr<ReceivedFrame> recFrame = receiveSingleFrame(cmdFrame, FunctionDeviceGetDSID);
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
throw DS485ApiError("No frame received");
}
@@ -931,7 +931,7 @@
log(string("Proxy: GetDSIDOfModulator ") + intToString(_modulatorID));
boost::shared_ptr<ReceivedFrame> recFrame = receiveSingleFrame(cmdFrame, FunctionModulatorGetDSID);
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
log("GetDSIDOfModulator: received no result from " + intToString(_modulatorID), lsError);
throw DS485ApiError("No frame received");
}
@@ -966,7 +966,7 @@
log(string("Proxy: GetPowerConsumption ") + intToString(_modulatorID));
boost::shared_ptr<ReceivedFrame> recFrame = receiveSingleFrame(cmdFrame, FunctionModulatorGetPowerConsumption);
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
log("DS485Proxy::getPowerConsumption: received no results", lsError);
throw DS485ApiError("No frame received");
}
@@ -986,7 +986,7 @@
log(string("Proxy: GetEnergyMeterValue ") + intToString(_modulatorID));
boost::shared_ptr<ReceivedFrame> recFrame = receiveSingleFrame(cmdFrame, FunctionModulatorGetEnergyMeterValue);
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
log("DS485Proxy::getEnergyMeterValue: received no results", lsError);
throw DS485ApiError("No frame received");
}
@@ -1006,7 +1006,7 @@
bucket->waitForFrame(1000);
boost::shared_ptr<ReceivedFrame> recFrame = bucket->popFrame();
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
throw DS485ApiError("No frame received");
}
@@ -1030,7 +1030,7 @@
boost::shared_ptr<FrameBucketCollector> bucket = sendFrameAndInstallBucket(cmdFrame, FunctionDSLinkReceive);
bucket->waitForFrame(10000);
boost::shared_ptr<ReceivedFrame> recFrame = bucket->popFrame();
- if(recFrame.get() == NULL) {
+ if(recFrame == NULL) {
log("dsLinkSend: No packet received", lsError);
throw DS485ApiError("No frame received");
}
More information about the dss-commits
mailing list