Skip to content

Commit d75d41c

Browse files
SwappyGjacobperron
authored andcommitted
address warnings and errors
1 parent de253b6 commit d75d41c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

include/create/serial_query.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ namespace create {
6868

6969
public:
7070
SerialQuery(std::shared_ptr<Data> data, bool install_signal_handler = true);
71+
virtual ~SerialQuery() = default;
7172
};
7273
} // namespace create
7374

include/create/serial_stream.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ namespace create {
7373
std::shared_ptr<Data> data,
7474
const uint8_t& header = create::util::STREAM_HEADER,
7575
bool install_signal_handler = true);
76+
virtual ~SerialStream() = default;
7677

7778
};
7879
} // namespace create

src/create.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ namespace create {
160160
prevTicksRight = totalTicksRight;
161161

162162
// Handle wrap around
163-
if (fabs(ticksLeft) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
163+
if (std::abs(ticksLeft) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
164164
ticksLeft = (ticksLeft % util::V_3_MAX_ENCODER_TICKS) + 1;
165165
}
166-
if (fabs(ticksRight) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
166+
if (std::abs(ticksRight) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
167167
ticksRight = (ticksRight % util::V_3_MAX_ENCODER_TICKS) + 1;
168168
}
169169

@@ -373,7 +373,7 @@ namespace create {
373373
min > 59)
374374
return false;
375375

376-
uint8_t cmd[4] = { OC_DATE, day, hour, min };
376+
uint8_t cmd[4] = { OC_DATE, static_cast<uint8_t>(day), hour, min };
377377
return serial->send(cmd, 4);
378378
}
379379

0 commit comments

Comments
 (0)