From 7c94908e2ab5f897ff20f20d449aad670ca9c980 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Sat, 1 Nov 2014 13:02:03 +0000 Subject: [PATCH 6/6] -Codechange: Make single-line function inline. --- src/video.cpp | 12 ------------ src/video.h | 13 ++++++++++++- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/video.cpp b/src/video.cpp index fb492c1..815d24a 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -480,18 +480,6 @@ void VideoSystem::FinishRepaint() } /** - * Blit pixels from the \a spr relative to #blit_rect into the area. - * @param img_base Coordinate of the sprite data. - * @param spr The sprite to blit. - * @param recolour Sprite recolouring definition. - * @param shift Gradient shift. - */ -void VideoSystem::BlitImage(const Point32 &img_base, const ImageData *spr, const Recolouring &recolour, GradientShift shift) -{ - this->BlitImages(img_base, spr, 1, 1, recolour, shift); -} - -/** * Blit a pixel to an area of \a numx times \a numy sprites. * @param cr Clipped rectangle. * @param scr_base Base address of the screen array. diff --git a/src/video.h b/src/video.h index 9c9c7ba..4528f81 100644 --- a/src/video.h +++ b/src/video.h @@ -127,7 +127,18 @@ public: this->BlitImages({x, ymin}, spr, 1, numy, recolour); } - void BlitImage(const Point32 &img_base, const ImageData *spr, const Recolouring &recolour, GradientShift shift); + /** + * Blit pixels from the \a spr relative to #blit_rect into the area. + * @param img_base Coordinate of the sprite data. + * @param spr The sprite to blit. + * @param recolour Sprite recolouring definition. + * @param shift Gradient shift. + */ + inline void BlitImage(const Point32 &img_base, const ImageData *spr, const Recolouring &recolour, GradientShift shift) + { + this->BlitImages(img_base, spr, 1, 1, recolour, shift); + } + void BlitImages(const Point32 &pt, const ImageData *spr, uint16 numx, uint16 numy, const Recolouring &recolour, GradientShift shift = GS_NORMAL); void FinishRepaint(); -- 2.1.3