From 56784aceabe51ad44f36b6fc7edbee1b873f817b Mon Sep 17 00:00:00 2001 From: leper Date: Wed, 13 Mar 2013 16:23:27 +0000 Subject: [PATCH] Fix signed/unsigned comparison warning. This was SVN commit r13274. --- source/soundmanager/js/SoundGroup.cpp | 4 ++-- source/soundmanager/js/SoundGroup.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/soundmanager/js/SoundGroup.cpp b/source/soundmanager/js/SoundGroup.cpp index 7b191cb3bd..ba3dde076f 100644 --- a/source/soundmanager/js/SoundGroup.cpp +++ b/source/soundmanager/js/SoundGroup.cpp @@ -157,7 +157,7 @@ float CSoundGroup::RadiansOffCenter(const CVector3D& position, bool& onScreen, f return answer; } -void CSoundGroup::UploadPropertiesAndPlay(int theIndex, const CVector3D& position, entity_id_t source) +void CSoundGroup::UploadPropertiesAndPlay(size_t theIndex, const CVector3D& position, entity_id_t source) { #if CONFIG2_AUDIO if ( g_SoundManager ) @@ -228,7 +228,7 @@ void CSoundGroup::PlayNext(const CVector3D& position, entity_id_t source) if (filenames.size() == 0) return; - m_index = (size_t)rand(0, (size_t)filenames.size()); + m_index = rand(0, (size_t)filenames.size()); UploadPropertiesAndPlay(m_index, position, source); } diff --git a/source/soundmanager/js/SoundGroup.h b/source/soundmanager/js/SoundGroup.h index d19783a74c..3796368918 100644 --- a/source/soundmanager/js/SoundGroup.h +++ b/source/soundmanager/js/SoundGroup.h @@ -108,11 +108,11 @@ public: private: void SetGain(float gain); - void UploadPropertiesAndPlay(int theIndex, const CVector3D& position, entity_id_t source); + void UploadPropertiesAndPlay(size_t theIndex, const CVector3D& position, entity_id_t source); void SetDefaultValues(); - int m_index; // index of the next sound to play + size_t m_index; // index of the next sound to play #if CONFIG2_AUDIO std::vector snd_group; // we store the handles so we can load now and play later