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

View File

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