From 9e7695d9e9541a2e7243d6de0fb0eaa5ce38004d Mon Sep 17 00:00:00 2001 From: Stefan Pöschel Date: Thu, 24 Aug 2017 16:37:22 +0200 Subject: Fix pedantic warnings and Makefile - fix pedantic warnings (binary literals) - remove orphaned path from compiler call - add C++11 standard and `-Wpedantic` to compiler call --- src/sls.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/sls.cpp') diff --git a/src/sls.cpp b/src/sls.cpp index a36c5da..4d24358 100644 --- a/src/sls.cpp +++ b/src/sls.cpp @@ -207,7 +207,7 @@ void MOTHeader::AddExtensionFixedSize(int pli, int param_id, const uint8_t* data void MOTHeader::AddExtensionVarSize(int param_id, const uint8_t* data_field, size_t data_field_len) { - AddParamHeader(0b11, param_id); + AddParamHeader(0x3, param_id); // longer field lens use 15 instead of 7 bits bool ext = data_field_len > 127; @@ -230,20 +230,20 @@ void MOTHeader::AddExtension(int param_id, const uint8_t* data_field, size_t dat switch(data_field_len) { case 0: - pli = 0b00; + pli = 0x0; // 0b00 break; case 1: - pli = 0b01; + pli = 0x1; // 0b01 break; case 4: - pli = 0b10; + pli = 0x2; // 0b10 break; default: - pli = 0b11; + pli = 0x3; // 0b11 break; } - if (pli == 0b11) + if (pli == 0x3) AddExtensionVarSize(param_id, data_field, data_field_len); else AddExtensionFixedSize(pli, param_id, data_field, data_field_len); -- cgit v1.2.3