Skip to content

Commit b7aa3b4

Browse files
authored
Fix arithmetic warnings (#11)
1 parent d62a051 commit b7aa3b4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ doc/html
3131
ipch
3232
Debug
3333
Release
34+
.idea/
3435

3536
# pixi environments
3637
.pixi

src/impl/unix.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ Serial::SerialImpl::reconfigurePort ()
455455
// Compensate for the stopbits_one_point_five enum being equal to int 3,
456456
// and not 1.5.
457457
if (stopbits_ == stopbits_one_point_five) {
458-
byte_time_ns_ += ((1.5 - stopbits_one_point_five) * bit_time_ns);
458+
byte_time_ns_ += (1.5 - static_cast<double>(stopbits_one_point_five)) * bit_time_ns;
459459
}
460460
}
461461

0 commit comments

Comments
 (0)