[Positioner] More explicit constructors

master
Matteo Cypriani 7 years ago
parent 6c17646cc3
commit c0db11a890

@ -32,7 +32,7 @@ public:
enum {north = 1, east, south, west} ;
Direction(void): direction(0) {}
Direction(const uint_fast8_t source) ;
explicit Direction(const uint_fast8_t source);
Direction(const Direction &source): direction(source.direction) {}
/** @name Accessors */

@ -228,7 +228,7 @@ bool InputUDPSocket::fill_current_request()
// Calibration request?
fill_calibration_request_data(
mac_mobile, position, request.direction, request.type) ;
mac_mobile, position, Direction(request.direction), request.type);
return true ;
}

@ -152,7 +152,7 @@ Timestamp Timestamp::elapsed(const Timestamp &source) const
d2 = source,
elapsed ;
owl_time_elapsed(&d1, &d2, &elapsed) ;
return elapsed ;
return Timestamp(elapsed);
}

@ -63,7 +63,7 @@ protected:
public:
Timestamp(void) ;
explicit Timestamp(const struct timespec &source);
Timestamp(const owl_timestamp &source) ;
explicit Timestamp(const owl_timestamp &source);
Timestamp(const uint_fast32_t source_s, const uint_fast32_t source_ns) ;
/// Constructs a Timsestamp from a value in milliseconds (deprecated)
explicit Timestamp(const uint64_t source);

Loading…
Cancel
Save