summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <kevron_m_rees@linux.intel.com>2012-08-29 16:07:40 -0700
committerKevron Rees <kevron_m_rees@linux.intel.com>2012-08-29 16:07:40 -0700
commitb58e12881b9b077e4793547c7fc32ba20e70a671 (patch)
treeca8e545c76e226f19586437899b746a749684ee6
parenta07e2af52039b47406ce8838313d988545cb3960 (diff)
downloadautomotive-message-broker-b58e12881b9b077e4793547c7fc32ba20e70a671.tar.gz
define nullptr if using < gcc 4.6
-rw-r--r--lib/vehicleproperty.h8
-rw-r--r--plugins/examplesink.cpp8
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/vehicleproperty.h b/lib/vehicleproperty.h
index ad249d97..200ec72b 100644
--- a/lib/vehicleproperty.h
+++ b/lib/vehicleproperty.h
@@ -20,6 +20,14 @@
#ifndef VEHICLEPROPERTY_H
#define VEHICLEPROPERTY_H
+#define GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+
+#if GCC_VERSION < 40600
+#define nullptr 0
+#endif
+
#include <string>
#include <list>
#include <set>
diff --git a/plugins/examplesink.cpp b/plugins/examplesink.cpp
index bb379b2e..f67c0a97 100644
--- a/plugins/examplesink.cpp
+++ b/plugins/examplesink.cpp
@@ -31,12 +31,12 @@ ExampleSink::ExampleSink(AbstractRoutingEngine* engine): AbstractSink(engine)
routingEngine->subscribeToProperty(VehicleProperty::EngineSpeed, this);
routingEngine->subscribeToProperty(VehicleProperty::VehicleSpeed, this);
- AsyncPropertyRequest velocityRequest;
+ /*AsyncPropertyRequest velocityRequest;
velocityRequest.property = VehicleProperty::VehicleSpeed;
velocityRequest.completed = [](AsyncPropertyReply* reply) { DebugOut()<<"Velocity Async request completed: "<<reply->value->toString()<<endl; };
- AsyncPropertyReply* reply = routingEngine->getPropertyAsync(velocityRequest);
- routingEngine->registerSink(this);
+ AsyncPropertyReply* reply = routingEngine->getPropertyAsync(velocityRequest);*/
+
}
@@ -47,7 +47,7 @@ PropertyList ExampleSink::subscriptions()
void ExampleSink::supportedChanged(PropertyList supportedProperties)
{
- printf("Support changed!\n");
+ printf("Support changed!\n");
routingEngine->subscribeToProperty(VehicleProperty::EngineSpeed, this);
routingEngine->subscribeToProperty(VehicleProperty::VehicleSpeed, this);
}