diff --git a/SDL2pp/AudioSpec.cc b/SDL2pp/AudioSpec.cc index bdf3569..15ff3f5 100644 --- a/SDL2pp/AudioSpec.cc +++ b/SDL2pp/AudioSpec.cc @@ -19,18 +19,14 @@ 3. This notice may not be removed or altered from any source distribution. */ -#include - #include namespace SDL2pp { -AudioSpec::AudioSpec() { - std::fill((char*)this, (char*)this + sizeof(SDL_AudioSpec), 0); +AudioSpec::AudioSpec() : SDL_AudioSpec{} { } -AudioSpec::AudioSpec(int freq, SDL_AudioFormat format, Uint8 channels, Uint16 samples) { - std::fill((char*)this, (char*)this + sizeof(SDL_AudioSpec), 0); +AudioSpec::AudioSpec(int freq, SDL_AudioFormat format, Uint8 channels, Uint16 samples) : SDL_AudioSpec{} { SDL_AudioSpec::freq = freq; SDL_AudioSpec::format = format; SDL_AudioSpec::channels = channels;