Automated style fixes in order to bring the code a little bit closer to compliance with MISRA C++ rules. No changes in logic.

This commit is contained in:
Pavel Kirienko
2014-03-25 03:04:36 +04:00
parent cce657e1fe
commit 0cc627016a
64 changed files with 777 additions and 283 deletions
+7 -3
View File
@@ -11,7 +11,7 @@ namespace uavcan
{
template <typename DataType_,
typename Callback = void(*)(const ReceivedDataStructure<DataType_>&),
typename Callback = void (*)(const ReceivedDataStructure<DataType_>&),
unsigned int NumStaticReceivers = 2,
unsigned int NumStaticBufs = 1>
class Subscriber : public GenericSubscriber<DataType_, DataType_,
@@ -28,17 +28,21 @@ class Subscriber : public GenericSubscriber<DataType_, DataType_,
void handleReceivedDataStruct(ReceivedDataStructure<DataType_>& msg)
{
if (try_implicit_cast<bool>(callback_, true))
{
callback_(msg);
}
else
{
handleFatalError("Invalid subscriber callback");
}
}
public:
typedef DataType_ DataType;
explicit Subscriber(INode& node)
: BaseType(node)
, callback_()
: BaseType(node)
, callback_()
{
StaticAssert<DataTypeKind(DataType::DataTypeKind) == DataTypeKindMessage>::check();
}