diff --git a/source/soundmanager/SoundManager.cpp b/source/soundmanager/SoundManager.cpp index 9f457a99cb..488fcc7b10 100644 --- a/source/soundmanager/SoundManager.cpp +++ b/source/soundmanager/SoundManager.cpp @@ -472,9 +472,9 @@ long CSoundManager::GetBufferSize() return m_BufferSize; } -void CSoundManager::AddPlayListItem( const VfsPath* itemPath) +void CSoundManager::AddPlayListItem(const VfsPath& itemPath) { - m_PlayListItems->push_back( *itemPath ); + m_PlayListItems->push_back(itemPath); } void CSoundManager::ClearPlayListItems() diff --git a/source/soundmanager/SoundManager.h b/source/soundmanager/SoundManager.h index ad41403f40..622d9278bc 100644 --- a/source/soundmanager/SoundManager.h +++ b/source/soundmanager/SoundManager.h @@ -106,7 +106,7 @@ public: void ClearPlayListItems(); void StartPlayList( bool doLoop ); - void AddPlayListItem( const VfsPath* itemPath); + void AddPlayListItem(const VfsPath& itemPath); static void ScriptingInit(); static void CreateSoundManager(); diff --git a/source/soundmanager/scripting/JSInterface_Sound.cpp b/source/soundmanager/scripting/JSInterface_Sound.cpp index 594752c13f..cd090287cf 100644 --- a/source/soundmanager/scripting/JSInterface_Sound.cpp +++ b/source/soundmanager/scripting/JSInterface_Sound.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2013 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -52,7 +52,7 @@ namespace JSI_Sound void AddPlaylistItem(void* UNUSED(cbdata), std::wstring filename) { if ( CSoundManager* sndManager = (CSoundManager*)g_SoundManager ) - sndManager->AddPlayListItem( new VfsPath( filename ) ); + sndManager->AddPlayListItem(VfsPath(filename)); } void StartPlaylist(void* UNUSED(cbdata), bool looping)