Restore asserts and error handling
A couple of them got improved out of existence.
This commit is contained in:
@@ -95,6 +95,7 @@ string UserStream::diff_from( const UserStream &existing ) const
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert( !"unexpected event type" );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -130,6 +131,7 @@ const Parser::Action &UserStream::get_action( unsigned int i ) const
|
||||
case ResizeType:
|
||||
return actions[ i ].resize;
|
||||
default:
|
||||
assert( !"unexpected action type" );
|
||||
static const Parser::Ignore nothing = Parser::Ignore();
|
||||
return nothing;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Network {
|
||||
/* interface for Network::Transport */
|
||||
void subtract( const UserStream *prefix );
|
||||
string diff_from( const UserStream &existing ) const;
|
||||
string init_diff( void ) const { return string(); };
|
||||
string init_diff( void ) const { return diff_from( UserStream() ); };
|
||||
void apply_string( const string &diff );
|
||||
bool operator==( const UserStream &x ) const { return actions == x.actions; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user