Skip to content

Commit

Permalink
Fixed astyle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
katemonster33 committed Dec 13, 2023
1 parent 8a2c351 commit 7056dc5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void exit_handler( int s )
} else
#endif
{
if(imclient) {
if( imclient ) {

Check failure on line 169 in src/main.cpp

View workflow job for this annotation

GitHub Actions / build (src)

'if' statement is unnecessary; deleting null pointer has no effect [readability-delete-null-pointer,-warnings-as-errors]
delete imclient;
}
exit( exit_status );
Expand Down
10 changes: 5 additions & 5 deletions src/ncurses_def.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(f), static_cast<int>(b));
if( imclient ) {
imclient->upload_color_pair( pair, static_cast<int>( f ), static_cast<int>( b ) );
}
return curses_check_result( ::init_pair( pair, static_cast<short>( f ), static_cast<short>( b ) ),
OK, "init_pair" );
Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/sdltiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
10 changes: 5 additions & 5 deletions src/ui_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 7056dc5

Please sign in to comment.