From a9412dc9f7fdb10409c04423bd1c127cf6969ea7 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 19 Mar 2019 13:24:56 +0100 Subject: [PATCH] Modernize Code: copy&move, empty, readability --- CSurface.cpp | 8 ++++---- SGE/sge_shape.cpp | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CSurface.cpp b/CSurface.cpp index 45a837f..13a3310 100644 --- a/CSurface.cpp +++ b/CSurface.cpp @@ -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); @@ -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); diff --git a/SGE/sge_shape.cpp b/SGE/sge_shape.cpp index 493f773..1b527e6 100644 --- a/SGE/sge_shape.cpp +++ b/SGE/sge_shape.cpp @@ -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() {