diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-11-20 04:06:31 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-11-20 04:06:31 +0300 |
commit | 93078915431d1fcd8ece793201cbeda0d32d8722 (patch) | |
tree | 158d42c54eda421a849e05847543427f069fb616 /src/adlmidi_private.hpp | |
parent | 549bcaa5dcd460a6aa5143776eeea6c4bde1cf5f (diff) | |
download | libADLMIDI-93078915431d1fcd8ece793201cbeda0d32d8722.tar.gz libADLMIDI-93078915431d1fcd8ece793201cbeda0d32d8722.tar.bz2 libADLMIDI-93078915431d1fcd8ece793201cbeda0d32d8722.zip |
Use const char* and const void* as input data types
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 39ec298..4d7251b 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -342,7 +342,7 @@ public: mp_tell = 0; } - void openData(void *mem, size_t lenght) + void openData(const void *mem, size_t lenght) { fp = NULL; mp = mem; @@ -392,7 +392,7 @@ public: while((pos < maxSize) && (mp_tell < mp_size)) { - reinterpret_cast<unsigned char *>(buf)[pos] = reinterpret_cast<unsigned char *>(mp)[mp_tell]; + reinterpret_cast<unsigned char *>(buf)[pos] = reinterpret_cast<unsigned const char *>(mp)[mp_tell]; mp_tell++; pos++; } @@ -408,7 +408,7 @@ public: else { if(mp_tell >= mp_size) return -1; - int x = reinterpret_cast<unsigned char *>(mp)[mp_tell]; + int x = reinterpret_cast<unsigned const char *>(mp)[mp_tell]; mp_tell++; return x; } @@ -446,7 +446,7 @@ public: } std::string _fileName; std::FILE *fp; - void *mp; + const void *mp; size_t mp_size; size_t mp_tell; }; @@ -812,11 +812,11 @@ public: uint64_t ReadVarLenEx(uint8_t **ptr, uint8_t *end, bool &ok); bool LoadBank(const std::string &filename); - bool LoadBank(void *data, unsigned long size); + bool LoadBank(const void *data, size_t size); bool LoadBank(fileReader &fr); bool LoadMIDI(const std::string &filename); - bool LoadMIDI(void *data, unsigned long size); + bool LoadMIDI(const void *data, size_t size); bool LoadMIDI(fileReader &fr); /** |