Const correctness and const-ref in Crypto and elsewhere.

This commit is contained in:
John Hood
2015-12-25 22:18:04 -05:00
parent 13928e9c10
commit 6abd4739de
16 changed files with 46 additions and 46 deletions
+2 -2
View File
@@ -170,7 +170,7 @@ DispatchRegistry & Terminal::get_global_dispatch_registry( void )
}
static void register_function( Function_Type type,
std::string dispatch_chars,
const std::string & dispatch_chars,
Function f )
{
switch ( type ) {
@@ -186,7 +186,7 @@ static void register_function( Function_Type type,
}
}
Function::Function( Function_Type type, std::string dispatch_chars,
Function::Function( Function_Type type, const std::string & dispatch_chars,
void (*s_function)( Framebuffer *, Dispatcher * ),
bool s_clears_wrap_state )
: function( s_function ), clears_wrap_state( s_clears_wrap_state )
+1 -1
View File
@@ -59,7 +59,7 @@ namespace Terminal {
class Function {
public:
Function() : function( NULL ), clears_wrap_state( true ) {}
Function( Function_Type type, std::string dispatch_chars,
Function( Function_Type type, const std::string & dispatch_chars,
void (*s_function)( Framebuffer *, Dispatcher * ),
bool s_clears_wrap_state = true );
void (*function)( Framebuffer *, Dispatcher * );
+3 -3
View File
@@ -49,9 +49,9 @@ namespace Terminal {
FrameState( const Framebuffer &s_last );
void append( const char c ) { str.append( 1, c ); }
void append( const size_t s, const char c ) { str.append( s, c ); }
void append( const wchar_t wc ) { Cell::append_to_str( str, wc ); }
void append( char c ) { str.append( 1, c ); }
void append( size_t s, char c ) { str.append( s, c ); }
void append( wchar_t wc ) { Cell::append_to_str( str, wc ); }
void append( const char * s ) { str.append( s ); }
void append_string( const std::string &append ) { str.append(append); }