[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:
Matteo Cypriani 2011-06-24 14:44:33 +02:00
parent 2ebb8c49bc
commit 84ea723528
1 changed files with 1 additions and 1 deletions

View File

@ -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) ;
}