Skip to content

Commit

Permalink
Message: initialize all fields in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasDebrunner committed Dec 11, 2023
1 parent 04fe4e7 commit c136149
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/mav/Message.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ namespace mav {
int _crc_offset = -1;

explicit Message(const MessageDefinition &message_definition) :
_message_definition(&message_definition) {
_source_partner({}),
_backing_memory({}),
_message_definition(&message_definition),
_crc_offset(-1) {
}

Message(const MessageDefinition &message_definition, ConnectionPartner source_partner, int crc_offset,
Expand Down
1 change: 1 addition & 0 deletions include/mav/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
*
****************************************************************************/

#include <cstring>
#include <sstream>
#include <string_view>
#include <chrono>
Expand Down

0 comments on commit c136149

Please sign in to comment.