mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
Merge #6796
6796: CSound: Initialize all members (fixes #6795) r=Robyt3 a=def- ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
commit
c955905662
|
@ -275,6 +275,11 @@ static void SdlCallback(void *pUnused, Uint8 *pStream, int Len)
|
|||
#endif
|
||||
}
|
||||
|
||||
CSound::CSound() :
|
||||
m_SoundEnabled(false), m_Device(0), m_pGraphics(nullptr), m_pStorage(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
int CSound::Init()
|
||||
{
|
||||
m_SoundEnabled = false;
|
||||
|
|
|
@ -28,6 +28,7 @@ class CSound : public IEngineSound
|
|||
static int DecodeOpus(int SampleID, const void *pData, unsigned DataSize);
|
||||
|
||||
public:
|
||||
CSound();
|
||||
int Init() override;
|
||||
int Update() override;
|
||||
void Shutdown() override;
|
||||
|
|
Loading…
Reference in a new issue