mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Resolve macOS compile warnings
This commit is contained in:
@@ -20,7 +20,7 @@ namespace icsneo {
|
||||
|
||||
class Communication {
|
||||
public:
|
||||
Communication(std::shared_ptr<ICommunication> com, std::shared_ptr<Packetizer> p, std::shared_ptr<Decoder> md) : impl(com), packetizer(p), decoder(md) {}
|
||||
Communication(std::shared_ptr<ICommunication> com, std::shared_ptr<Packetizer> p, std::shared_ptr<Decoder> md) : packetizer(p), decoder(md), impl(com) {}
|
||||
virtual ~Communication() { close(); }
|
||||
|
||||
bool open();
|
||||
|
||||
@@ -41,6 +41,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -12,6 +12,6 @@ public:
|
||||
Command command;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -19,6 +19,6 @@ public:
|
||||
bool hasPCBSerial = false;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -96,7 +96,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();
|
||||
|
||||
@@ -5,7 +5,7 @@ using namespace icsneo;
|
||||
|
||||
uint8_t Packetizer::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++;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace icsneo {
|
||||
|
||||
class Device {
|
||||
public:
|
||||
static constexpr char* SERIAL_FIND_ON_OPEN = "xxxxxx";
|
||||
static constexpr const char* SERIAL_FIND_ON_OPEN = "xxxxxx";
|
||||
|
||||
Device(neodevice_t neodevice = {}) {
|
||||
data = neodevice;
|
||||
|
||||
Reference in New Issue
Block a user