aboutsummaryrefslogtreecommitdiffstats
path: root/src/sls.cpp
diff options
context:
space:
mode:
authorStefan Pöschel <github@basicmaster.de>2017-08-24 16:37:22 +0200
committerStefan Pöschel <github@basicmaster.de>2017-08-24 16:37:22 +0200
commit9e7695d9e9541a2e7243d6de0fb0eaa5ce38004d (patch)
treeb9ae820785968288b69f2c8e969cd45ecac62fe2 /src/sls.cpp
parent9f62da63eb7577d30dc67fc2823201b4f2598ffa (diff)
downloadODR-PadEnc-9e7695d9e9541a2e7243d6de0fb0eaa5ce38004d.tar.gz
ODR-PadEnc-9e7695d9e9541a2e7243d6de0fb0eaa5ce38004d.tar.bz2
ODR-PadEnc-9e7695d9e9541a2e7243d6de0fb0eaa5ce38004d.zip
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
Diffstat (limited to 'src/sls.cpp')
-rw-r--r--src/sls.cpp12
1 files changed, 6 insertions, 6 deletions
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);