Skip to content

Commit

Permalink
Suppress a warning for quadrant_from_x_y
Browse files Browse the repository at this point in the history
Don't want to port this one to use a point.
  • Loading branch information
jbytheway committed Apr 28, 2020
1 parent fa6ac42 commit 720ad83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lightmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ bool map::pl_line_of_sight( const tripoint &t, const int max_range ) const

// For a direction vector defined by x, y, return the quadrant that's the
// source of that direction. Assumes x != 0 && y != 0
// NOLINTNEXTLINE(cata-xy)
static constexpr quadrant quadrant_from_x_y( int x, int y )
{
return ( x > 0 ) ?
Expand Down
3 changes: 3 additions & 0 deletions src/sdl_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include <memory>

struct point;

struct SDL_Renderer_deleter {
void operator()( SDL_Renderer *const renderer ) {
SDL_DestroyRenderer( renderer );
Expand Down Expand Up @@ -86,6 +88,7 @@ SDL_Texture_Ptr CreateTextureFromSurface( const SDL_Renderer_Ptr &renderer,
const SDL_Surface_Ptr &surface );
void SetRenderDrawColor( const SDL_Renderer_Ptr &renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a );
// NOLINTNEXTLINE(cata-xy)
void RenderDrawPoint( const SDL_Renderer_Ptr &renderer, const point &p );
void RenderDrawPoint( const SDL_Renderer_Ptr &renderer, int x, int y );
void RenderFillRect( const SDL_Renderer_Ptr &renderer, const SDL_Rect *rect );
void FillRect( const SDL_Surface_Ptr &surface, const SDL_Rect *rect, Uint32 color );
Expand Down

0 comments on commit 720ad83

Please sign in to comment.