[Positioning] Direction: 0 is valid to construct
Accept 0 as a "valid" value for the constructor and operator=() (constructing a Direction with 0 value was possible any way, using the default constructor). This fixes the reception of requests on UDP.
This commit is contained in:
parent
2ebb8c49bc
commit
84ea723528
|
@ -21,7 +21,7 @@ Direction::Direction(const char source):
|
|||
|
||||
inline void Direction::assert_valid() const
|
||||
{
|
||||
if (! is_valid())
|
||||
if (! (is_valid() || direction == 0))
|
||||
throw bad_direction(direction) ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue