mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
fix MSVC build errors and warnings
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <icsneo/communication/message/flexray/control/flexraycontrolmessage.h>
|
||||
#include <cstring> // memcpy
|
||||
#include <limits>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace icsneo;
|
||||
|
||||
@@ -8,7 +9,7 @@ std::vector<uint8_t> FlexRayControlMessage::BuildBaseControlArgs(uint8_t control
|
||||
std::vector<uint8_t> ret;
|
||||
ret.reserve(args.size() + 4);
|
||||
ret.push_back(controller);
|
||||
const uint16_t size = uint16_t(std::min(args.size() + 1, size_t(std::numeric_limits<uint16_t>::max()))); // Add 1 for the opcode
|
||||
const uint16_t size = uint16_t((std::min)(args.size() + 1, size_t(std::numeric_limits<uint16_t>::max()))); // Add 1 for the opcode
|
||||
ret.push_back(uint8_t(size));
|
||||
ret.push_back(uint8_t(size >> 8));
|
||||
ret.push_back(uint8_t(op));
|
||||
|
||||
@@ -59,5 +59,8 @@ std::shared_ptr<FlexRayMessage> HardwareFlexRayPacket::DecodeToMessage(const std
|
||||
}
|
||||
|
||||
bool HardwareFlexRayPacket::EncodeFromMessage(const FlexRayMessage& message, std::vector<uint8_t>& bytestream, const device_eventhandler_t& report) {
|
||||
(void)message;
|
||||
(void)bytestream;
|
||||
(void)report;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user