Fix: SoundBuffer should not move (as a refcount)

This commit is contained in:
Lynix 2017-09-30 14:35:26 +02:00
parent aa80f52597
commit 85442a14fa
2 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ namespace Nz
SoundBuffer() = default;
SoundBuffer(AudioFormat format, UInt64 sampleCount, UInt32 sampleRate, const Int16* samples);
SoundBuffer(const SoundBuffer&) = delete;
SoundBuffer(SoundBuffer&&) noexcept = default;
SoundBuffer(SoundBuffer&&) = delete;
~SoundBuffer();
bool Create(AudioFormat format, UInt64 sampleCount, UInt32 sampleRate, const Int16* samples);
@ -75,7 +75,7 @@ namespace Nz
template<typename... Args> static SoundBufferRef New(Args&&... args);
SoundBuffer& operator=(const SoundBuffer&) = delete;
SoundBuffer& operator=(SoundBuffer&&) noexcept = default;
SoundBuffer& operator=(SoundBuffer&&) = delete;
// Signals:
NazaraSignal(OnSoundBufferDestroy, const SoundBuffer* /*soundBuffer*/);

View File

@ -17,7 +17,7 @@ namespace Nz
public:
Resource() = default;
Resource(const Resource&) = default;
Resource(Resource&&) = default;
Resource(Resource&&) noexcept = default;
virtual ~Resource();
const String& GetFilePath() const;
@ -25,7 +25,7 @@ namespace Nz
void SetFilePath(const String& filePath);
Resource& operator=(const Resource&) = default;
Resource& operator=(Resource&&) = default;
Resource& operator=(Resource&&) noexcept = default;
private:
String m_filePath;