Skip to content

Commit b75ae12

Browse files
committed
engine: Add const for some class methods
1 parent b82393a commit b75ae12

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

engine/audio/private/snd_channels.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ class CActiveChannels
236236
void Add( channel_t *pChannel );
237237
void Remove( channel_t *pChannel );
238238

239-
void GetActiveChannels( CChannelList &list );
239+
void GetActiveChannels( CChannelList &list ) const;
240240

241241
void Init();
242-
int GetActiveCount() { return m_count; }
242+
int GetActiveCount() const { return m_count; }
243243
private:
244244
int m_count;
245245
short m_list[MAX_CHANNELS];

engine/audio/private/snd_dma.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void CActiveChannels::Remove( channel_t *pChannel )
190190
}
191191

192192

193-
void CActiveChannels::GetActiveChannels( CChannelList &list )
193+
void CActiveChannels::GetActiveChannels( CChannelList &list ) const
194194
{
195195
list.m_count = m_count;
196196
if ( m_count )
@@ -387,7 +387,7 @@ const char *CSfxTable::getname()
387387
return NULL;
388388
}
389389

390-
FileNameHandle_t CSfxTable::GetFileNameHandle()
390+
FileNameHandle_t CSfxTable::GetFileNameHandle() const
391391
{
392392
if ( s_Sounds.InvalidIndex() != m_namePoolIndex )
393393
{

engine/audio/private/snd_sfx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CSfxTable
2424
virtual const char *getname();
2525
// gets the filename, the part after the optional prefixes
2626
const char *GetFileName();
27-
FileNameHandle_t GetFileNameHandle();
27+
FileNameHandle_t GetFileNameHandle() const;
2828

2929
void SetNamePoolIndex( unsigned short index );
3030
bool IsPrecachedSound();

0 commit comments

Comments
 (0)