Restore asserts and error handling

A couple of them got improved out of existence.
This commit is contained in:
John Hood
2017-08-13 00:27:23 -04:00
parent 790b479f8a
commit b11d524bb7
6 changed files with 27 additions and 22 deletions
+2
View File
@@ -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;
}
+1 -1
View File
@@ -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; }