More constructor style clean-up.

This commit is contained in:
Jared Boone 2015-11-11 09:35:28 -08:00
parent d02698a6de
commit 2c64454172
2 changed files with 8 additions and 6 deletions

View File

@ -113,8 +113,7 @@ static __attribute__((noreturn)) msg_t baseband_fn(void *arg) {
stats.process(buffer, stats.process(buffer,
[](const BasebandStatistics statistics) { [](const BasebandStatistics statistics) {
BasebandStatisticsMessage message; const BasebandStatisticsMessage message { statistics };
message.statistics = statistics;
shared_memory.application_queue.push(message); shared_memory.application_queue.push(message);
} }
); );
@ -138,8 +137,7 @@ static __attribute__((noreturn)) msg_t rssi_fn(void *arg) {
stats.process( stats.process(
buffer, buffer,
[](const RSSIStatistics statistics) { [](const RSSIStatistics statistics) {
RSSIStatisticsMessage message; const RSSIStatisticsMessage message { statistics };
message.statistics = statistics;
shared_memory.application_queue.push(message); shared_memory.application_queue.push(message);
} }
); );

View File

@ -69,7 +69,9 @@ struct RSSIStatistics {
class RSSIStatisticsMessage : public Message { class RSSIStatisticsMessage : public Message {
public: public:
constexpr RSSIStatisticsMessage( constexpr RSSIStatisticsMessage(
) : Message { ID::RSSIStatistics } const RSSIStatistics& statistics
) : Message { ID::RSSIStatistics },
statistics { statistics }
{ {
} }
@ -87,7 +89,9 @@ struct BasebandStatistics {
class BasebandStatisticsMessage : public Message { class BasebandStatisticsMessage : public Message {
public: public:
constexpr BasebandStatisticsMessage( constexpr BasebandStatisticsMessage(
) : Message { ID::BasebandStatistics } const BasebandStatistics& statistics
) : Message { ID::BasebandStatistics },
statistics { statistics }
{ {
} }