Resolve macOS warnings and standardize style

This commit is contained in:
Paul Hollinsky
2018-09-24 19:04:20 -04:00
parent b634e6a443
commit 2099ba9d1e
40 changed files with 50 additions and 44 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ int Communication::messageCallbackIDCounter = 1;
uint8_t Communication::ICSChecksum(const std::vector<uint8_t>& data) {
uint32_t checksum = 0;
for(auto i = 0; i < data.size(); i++)
for(size_t i = 0; i < data.size(); i++)
checksum += data[i];
checksum = ~checksum;
checksum++;
+1 -1
View File
@@ -60,6 +60,6 @@ private:
void readTask();
};
};
}
#endif
+1 -1
View File
@@ -38,6 +38,6 @@ protected:
std::atomic<bool> closing{false};
};
};
}
#endif
+1 -1
View File
@@ -41,6 +41,6 @@ public:
CANMessageCallback(CANMessageFilter f, fn_messageCallback cb) : MessageCallback(cb, std::make_shared<CANMessageFilter>(f)) {}
};
};
}
#endif
+1 -1
View File
@@ -67,6 +67,6 @@ private:
}
};
};
}
#endif
@@ -97,6 +97,6 @@ private:
void readTask();
};
};
}
#endif
+1 -1
View File
@@ -335,6 +335,6 @@ private:
}
};
};
}
#endif
+1 -1
View File
@@ -10,6 +10,6 @@ public:
uint32_t arbid;
};
};
}
#endif
+1 -1
View File
@@ -14,6 +14,6 @@ public:
uint64_t timestamp;
};
};
}
#endif
+4 -2
View File
@@ -33,8 +33,10 @@ typedef struct {
#include "communication/message/include/message.h"
namespace icsneo {
neomessage_t CreateNeoMessage(const Message& message);
};
neomessage_t CreateNeoMessage(const Message& message);
}
#endif
#endif
+1 -1
View File
@@ -97,7 +97,7 @@ void MultiChannelCommunication::readTask() {
continue;
}
for(auto i = 0; i < currentReadIndex; i++)
for(size_t i = 0; i < currentReadIndex; i++)
usbReadFifo.pop_front();
payloadBytes.clear();
+1 -1
View File
@@ -68,7 +68,7 @@ bool Packetizer::input(const std::vector<uint8_t>& inputBytes) {
break;
case ReadState::GetData:
// We do not include the checksum in packetLength so it doesn't get copied into the payload buffer
if(bytes.size() < packetLength + (checksum ? 1 : 0)) { // Read until we have the rest of the packet
if(bytes.size() < (size_t)(packetLength + (checksum ? 1 : 0))) { // Read until we have the rest of the packet
haveEnoughData = false;
break;
}