Permalink
Browse files

Adding explicit keyword to Timeout constructor to prevent accidental …

…conversion from int types.
  • Loading branch information...
1 parent c829e6a commit 7e46129f7df25d28c479a21228343a2f4ac747b0 @wjwwood committed Jul 30, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 include/serial/serial.h
View
@@ -126,9 +126,11 @@ struct Timeout {
*/
uint32_t write_timeout_multiplier;
- Timeout (uint32_t inter_byte_timeout_=0, uint32_t read_timeout_constant_=0,
- uint32_t read_timeout_multiplier_=0, uint32_t write_timeout_constant_=0,
- uint32_t write_timeout_multiplier_=0)
+ explicit Timeout (uint32_t inter_byte_timeout_=0,
+ uint32_t read_timeout_constant_=0,
+ uint32_t read_timeout_multiplier_=0,
+ uint32_t write_timeout_constant_=0,
+ uint32_t write_timeout_multiplier_=0)
: inter_byte_timeout(inter_byte_timeout_),
read_timeout_constant(read_timeout_constant_),
read_timeout_multiplier(read_timeout_multiplier_),

0 comments on commit 7e46129

Please sign in to comment.