Skip to content

Commit

Permalink
Modernize Code: copy&move, empty, readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Mar 19, 2019
1 parent c4342c7 commit a9412dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions CSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ SDL_Rect rect2SDL_Rect(const Rect& rect)
return result;
}

void DrawPreCalcFadedTexturedTrigon(SDL_Surface* dest, Point16 p1, Point16 p2, Point16 p3, SDL_Surface* source, const SDL_Rect& rect,
Uint16 I1, Uint16 I2, Uint8 PreCalcPalettes[][256])
void DrawPreCalcFadedTexturedTrigon(SDL_Surface* dest, const Point16& p1, const Point16& p2, const Point16& p3, SDL_Surface* source,
const SDL_Rect& rect, Uint16 I1, Uint16 I2, Uint8 PreCalcPalettes[][256])
{
Sint16 right = rect.x + rect.w - 1;
Sint16 middle = rect.x + rect.w / Sint16(2);
Expand All @@ -31,8 +31,8 @@ void DrawPreCalcFadedTexturedTrigon(SDL_Surface* dest, Point16 p1, Point16 p2, P
I1, I2, I2, PreCalcPalettes, &source->format->colorkey, 1);
}

void DrawFadedTexturedTrigon(SDL_Surface* dest, Point16 p1, Point16 p2, Point16 p3, SDL_Surface* source, const SDL_Rect& rect, Sint32 I1,
Sint32 I2)
void DrawFadedTexturedTrigon(SDL_Surface* dest, const Point16& p1, const Point16& p2, const Point16& p3, SDL_Surface* source,
const SDL_Rect& rect, Sint32 I1, Sint32 I2)
{
Sint16 right = rect.x + rect.w - 1;
Sint16 middle = rect.x + rect.w / Sint16(2);
Expand Down
5 changes: 1 addition & 4 deletions SGE/sge_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,7 @@ sge_surface::sge_surface(SDL_Surface* dest, SDL_Surface* src, Sint16 x, Sint16 y
warp_border = false;
}

sge_surface::~sge_surface()
{
// Nothing for now...
}
sge_surface::~sge_surface() = default;

bool sge_surface::check_warp()
{
Expand Down

0 comments on commit a9412dc

Please sign in to comment.