Const correctness and const-ref in Crypto and elsewhere.
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -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 * );
|
||||
|
||||
@@ -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); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user