Always use std::min, std::max.

This commit is contained in:
John Hood
2018-08-15 01:44:54 -04:00
parent e5f8a826ef
commit fb23168ed9
5 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -619,7 +619,7 @@ void Dispatcher::OSC_dispatch( const Parser::OSC_End *act __attribute((unused)),
bool set_title = cmd_num == 0 || cmd_num == 2;
if ( set_icon || set_title ) {
fb->set_title_initialized();
int title_length = min(OSC_string.size(), (size_t)256);
int title_length = std::min(OSC_string.size(), (size_t)256);
Terminal::Framebuffer::title_type newtitle( OSC_string.begin() + offset, OSC_string.begin() + title_length );
if ( set_icon ) { fb->set_icon_name( newtitle ); }
if ( set_title ) { fb->set_window_title( newtitle ); }