human_readable_duration, Terminal::appendstring: Pass strings by reference
Found by cppcheck. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Keith Winstein
parent
e2abb8524f
commit
d0eeabb51e
@@ -172,7 +172,7 @@ NotificationEngine::NotificationEngine()
|
||||
show_quit_keystroke( true )
|
||||
{}
|
||||
|
||||
static std::string human_readable_duration( int num_seconds, const std::string seconds_abbr ) {
|
||||
static std::string human_readable_duration( int num_seconds, const std::string &seconds_abbr ) {
|
||||
char tmp[ 128 ];
|
||||
if ( num_seconds < 60 ) {
|
||||
snprintf( tmp, 128, "%d %s", num_seconds, seconds_abbr.c_str() );
|
||||
|
||||
Reference in New Issue
Block a user