From 5940c3a1483336243f6057c686f895b23e0c553e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 14 Feb 2003 22:49:51 +0000 Subject: [PATCH] add a char_traits for Sint32 --- stepmania/src/SDL_utils.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/stepmania/src/SDL_utils.h b/stepmania/src/SDL_utils.h index 257f1eda7b..0cfd821a26 100644 --- a/stepmania/src/SDL_utils.h +++ b/stepmania/src/SDL_utils.h @@ -28,5 +28,31 @@ SDL_Surface *SDL_CreateRGBSurfaceSane void FixHiddenAlpha(SDL_Surface *img); +struct char_traits_Sint32: public char_traits +{ + + static Sint32 *copy(Sint32 *s, const Sint32 *p, size_t n) + { + memcpy(s, p, n * sizeof(Sint32)); + return s; + } + static Sint32 *move(Sint32 *s, const Sint32 *p, size_t n) + { + memmove(s, p, n * sizeof(Sint32)); + return s; + } + static Sint32 *assign(Sint32 *s, unsigned cnt, int n) + { + while(cnt--) *(s++) = n; + return s; + } + static void assign(Sint32 &c1, Sint32 c2) + { + c1 = c2; + } + + +}; + #endif