aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_load.cpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-02-16 18:07:13 +0300
committerWohlstand <admin@wohlnet.ru>2017-02-16 18:07:13 +0300
commit88a117c706328e8ccead5280490a447ab8a28383 (patch)
treed9b87df76527f17fc83c5392154cadc572e368bb /src/adlmidi_load.cpp
parent4091cf15cd5273f1381f1ed6d3e836774f9ac0e8 (diff)
downloadlibADLMIDI-88a117c706328e8ccead5280490a447ab8a28383.tar.gz
libADLMIDI-88a117c706328e8ccead5280490a447ab8a28383.tar.bz2
libADLMIDI-88a117c706328e8ccead5280490a447ab8a28383.zip
Remove usage of std::shared_ptr
because it is not supported on Android NDK, yet (even C++11 usagae is enabled!)
Diffstat (limited to 'src/adlmidi_load.cpp')
-rw-r--r--src/adlmidi_load.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp
index 1ef355d..a39c191 100644
--- a/src/adlmidi_load.cpp
+++ b/src/adlmidi_load.cpp
@@ -26,8 +26,6 @@
#include "adlmidi_mus2mid.h"
#include "adlmidi_xmi2mid.h"
-#include <memory>
-
uint64_t MIDIplay::ReadBEint(const void *buffer, size_t nbytes)
{
uint64_t result = 0;
@@ -105,7 +103,7 @@ bool MIDIplay::LoadMIDI(MIDIplay::fileReader &fr)
size_t fsize;
qqq(fsize);
//! Temp buffer for conversion
- std::shared_ptr<uint8_t> cvt_buf;
+ AdlMIDI_CPtr<uint8_t> cvt_buf;
//std::FILE* fr = std::fopen(filename.c_str(), "rb");
if(!fr.isValid())
@@ -219,7 +217,7 @@ riffskip:
ADLMIDI_ErrorString = "Invalid MUS/DMX data format!";
return false;
}
- cvt_buf.reset(mid, ::free);
+ cvt_buf.reset(mid);
//Open converted MIDI file
fr.openData(mid, static_cast<size_t>(mid_len));
//Re-Read header again!
@@ -257,7 +255,7 @@ riffskip:
ADLMIDI_ErrorString = "Invalid XMI data format!";
return false;
}
- cvt_buf.reset(mid, ::free);
+ cvt_buf.reset(mid);
//Open converted MIDI file
fr.openData(mid, static_cast<size_t>(mid_len));
//Re-Read header again!