Replace a lot of memset with {} initializers

This commit is contained in:
Matthias Grob
2019-10-15 14:57:38 +02:00
committed by Daniel Agar
parent b8f70e865c
commit e843090383
12 changed files with 35 additions and 80 deletions

View File

@@ -70,9 +70,7 @@ public:
_rcinput_pub(nullptr),
_channels(8), //D8R-II plus
_data{}
{
memset(_ch_fd, 0, sizeof(_ch_fd));
}
{ }
~RcInput()
{
work_cancel(HPWORK, &_work);
@@ -101,7 +99,7 @@ private:
orb_advert_t _rcinput_pub;
int _channels;
int _ch_fd[input_rc_s::RC_INPUT_MAX_CHANNELS];
int _ch_fd[input_rc_s::RC_INPUT_MAX_CHANNELS] {};
struct input_rc_s _data;
int navio_rc_init();