use Sint32 char_traits correctly

This commit is contained in:
Glenn Maynard
2003-02-14 22:52:38 +00:00
parent 85d15e9976
commit dd06dddc75
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -293,7 +293,7 @@ void SoundMixBuffer::write(const Sint16 *buf, unsigned size)
{
if(mixbuf.size() < size)
{
basic_string<Sint32,char_traits_Sint32> empty(size-mixbuf.size(), 0);
basic_string<Sint32> empty(size-mixbuf.size(), 0);
mixbuf.insert(mixbuf.end(), empty.begin(), empty.end());
}
+1 -1
View File
@@ -68,7 +68,7 @@ public:
/* This inputs and outputs 16-bit 44khz stereo input. */
class SoundMixBuffer
{
basic_string<Sint32,char_traits_Sint32> mixbuf;
basic_string<Sint32> mixbuf;
float vol;
public:
+2 -4
View File
@@ -28,9 +28,9 @@ SDL_Surface *SDL_CreateRGBSurfaceSane
void FixHiddenAlpha(SDL_Surface *img);
struct char_traits_Sint32: public char_traits<Sint32>
template<>
struct char_traits<Sint32>
{
static Sint32 *copy(Sint32 *s, const Sint32 *p, size_t n)
{
memcpy(s, p, n * sizeof(Sint32));
@@ -50,8 +50,6 @@ struct char_traits_Sint32: public char_traits<Sint32>
{
c1 = c2;
}
};
#endif