From 7056dc585d449f322507f96cc57bd055bab421a0 Mon Sep 17 00:00:00 2001 From: Katie M Date: Wed, 13 Dec 2023 16:34:13 -0500 Subject: [PATCH] Fixed astyle errors --- src/main.cpp | 2 +- src/ncurses_def.cpp | 10 +++++----- src/sdltiles.cpp | 2 +- src/ui_manager.cpp | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 98f4973081d8a..617fccff93810 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -166,7 +166,7 @@ void exit_handler( int s ) } else #endif { - if(imclient) { + if( imclient ) { delete imclient; } exit( exit_status ); diff --git a/src/ncurses_def.cpp b/src/ncurses_def.cpp index 28f4664c8aecb..a4b21c116220b 100644 --- a/src/ncurses_def.cpp +++ b/src/ncurses_def.cpp @@ -295,8 +295,8 @@ static_assert( catacurses::white == COLOR_WHITE, void catacurses::init_pair( const short pair, const base_color f, const base_color b ) { - if(imclient) { - imclient->upload_color_pair(pair, static_cast(f), static_cast(b)); + if( imclient ) { + imclient->upload_color_pair( pair, static_cast( f ), static_cast( b ) ); } return curses_check_result( ::init_pair( pair, static_cast( f ), static_cast( b ) ), OK, "init_pair" ); @@ -420,7 +420,7 @@ input_event input_manager::get_input_event( const keyboard_mode /*preferred_keyb MEVENT event; if( getmouse( &event ) == OK ) { rval.type = input_event_t::mouse; - rval.mouse_pos = point( event.x, event.y ); + rval.mouse_pos = point( event.x, event.y ); if( event.bstate & BUTTON1_CLICKED || event.bstate & BUTTON1_RELEASED ) { rval.add_input( MouseInput::LeftButtonReleased ); } else if( event.bstate & BUTTON1_PRESSED ) { @@ -467,7 +467,7 @@ input_event input_manager::get_input_event( const keyboard_mode /*preferred_keyb // Other control character, etc. - no text at all, return an event // without the text property previously_pressed_key = key; - imclient->process_input(&rval); + imclient->process_input( &rval ); return input_event( key, input_event_t::keyboard_char ); } // Now we have loaded an UTF-8 sequence (possibly several bytes) @@ -484,7 +484,7 @@ input_event input_manager::get_input_event( const keyboard_mode /*preferred_keyb // as it would conflict with the special keys defined by ncurses rval.add_input( key ); } - imclient->process_input(&rval); + imclient->process_input( &rval ); } while( key == KEY_RESIZE ); return rval; diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 746adb347d58e..13265880592e1 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -3025,7 +3025,7 @@ static void CheckMessages() bool render_target_reset = false; while( SDL_PollEvent( &ev ) ) { - imclient->process_input(&ev); + imclient->process_input( &ev ); switch( ev.type ) { case SDL_WINDOWEVENT: switch( ev.window.event ) { diff --git a/src/ui_manager.cpp b/src/ui_manager.cpp index b8803b73e8735..168c51b70147d 100644 --- a/src/ui_manager.cpp +++ b/src/ui_manager.cpp @@ -336,7 +336,7 @@ void ui_adaptor::redraw_all() } #if !(defined(TILES) || defined(_WIN32)) -extern cataimgui::client* imclient; +extern cataimgui::client *imclient; #endif void ui_adaptor::redraw_all_invalidated( bool draw_imgui ) @@ -346,7 +346,7 @@ void ui_adaptor::redraw_all_invalidated( bool draw_imgui ) } #if !(defined(TILES) || defined(_WIN32)) - if(imclient) { + if( imclient ) { imclient->new_frame(); } #endif @@ -457,9 +457,9 @@ void ui_adaptor::redraw_all_invalidated( bool draw_imgui ) } while( restart_redrawing ); #if !(defined(TILES) || defined(_WIN32)) -if(imclient) { - imclient->end_frame(); -} + if( imclient ) { + imclient->end_frame(); + } #endif }