forked from mirrors/0ad
Remove manual Close method from OggStream
The OggStream interface no longer needs the Close() method. OpenOggNonstream returns a smart pointer (OggStreamPtr), so resource cleanup is automatically handled by the destructor. OggStreamImpl now calls ov_clear in its destructor, making manual cleanup unnecessary. This commit removes the Close() method from the interface and its implementation.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -33,10 +33,6 @@ COggData::COggData()
|
||||
|
||||
COggData::~COggData()
|
||||
{
|
||||
AL_CHECK;
|
||||
if (ogg)
|
||||
ogg->Close();
|
||||
|
||||
AL_CHECK;
|
||||
if ( m_BuffersUsed > 0 )
|
||||
alDeleteBuffers(m_BuffersUsed, &m_Buffer[0]);
|
||||
|
||||
@@ -156,11 +156,9 @@ public:
|
||||
Open();
|
||||
}
|
||||
|
||||
Status Close()
|
||||
~OggStreamImpl()
|
||||
{
|
||||
ov_clear(&m_VorbisFile);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual ALenum Format()
|
||||
|
||||
@@ -34,7 +34,6 @@ public:
|
||||
virtual ALsizei SamplingRate() = 0;
|
||||
virtual bool atFileEOF() = 0;
|
||||
virtual Status ResetFile() = 0;
|
||||
virtual Status Close() = 0;
|
||||
|
||||
/**
|
||||
* @return bytes read (<= size) or a (negative) Status
|
||||
|
||||
Reference in New Issue
Block a user