Added ResourceRef (Automatic resource reference)
Former-commit-id: 97a0b2732f4dc443b8e1676e68b33b1b53ddf4fb
This commit is contained in:
@@ -42,7 +42,7 @@ class NAZARA_API NzSound : public NzSoundEmitter
|
||||
void Stop();
|
||||
|
||||
private:
|
||||
const NzSoundBuffer* m_buffer = nullptr;
|
||||
NzSoundBufferConstRef m_buffer;
|
||||
};
|
||||
|
||||
#endif // NAZARA_SOUND_HPP
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <Nazara/Core/NonCopyable.hpp>
|
||||
#include <Nazara/Core/Resource.hpp>
|
||||
#include <Nazara/Core/ResourceLoader.hpp>
|
||||
#include <Nazara/Core/ResourceRef.hpp>
|
||||
|
||||
struct NzSoundBufferParams
|
||||
{
|
||||
@@ -22,7 +23,9 @@ struct NzSoundBufferParams
|
||||
class NzSound;
|
||||
class NzSoundBuffer;
|
||||
|
||||
using NzSoundBufferConstRef = NzResourceRef<const NzSoundBuffer>;
|
||||
using NzSoundBufferLoader = NzResourceLoader<NzSoundBuffer, NzSoundBufferParams>;
|
||||
using NzSoundBufferRef = NzResourceRef<NzSoundBuffer>;
|
||||
|
||||
struct NzSoundBufferImpl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user