diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-10-20 04:28:53 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-10-20 04:28:53 +0300 |
commit | eb45a7913d83fe2a3dc03033230950e78fb9755d (patch) | |
tree | d7318e79b08404f293fb99bb22e0ed202e07d890 /src/gen_adldata/file_formats/common.h | |
parent | e95cde9fea4f9daf3e19492021b8a153acae0404 (diff) | |
download | libADLMIDI-eb45a7913d83fe2a3dc03033230950e78fb9755d.tar.gz libADLMIDI-eb45a7913d83fe2a3dc03033230950e78fb9755d.tar.bz2 libADLMIDI-eb45a7913d83fe2a3dc03033230950e78fb9755d.zip |
Added CMake support
Diffstat (limited to 'src/gen_adldata/file_formats/common.h')
-rw-r--r-- | src/gen_adldata/file_formats/common.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/gen_adldata/file_formats/common.h b/src/gen_adldata/file_formats/common.h deleted file mode 100644 index d06059e..0000000 --- a/src/gen_adldata/file_formats/common.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef COMMON_H -#define COMMON_H - -#include <stdint.h> - -inline uint16_t toUint16BE(const uint8_t *arr) -{ - uint16_t num = arr[1]; - num |= ((arr[0] << 8) & 0xFF00); - return num; -} - -inline int16_t toSint16BE(const uint8_t *arr) -{ - int16_t num = *reinterpret_cast<const int8_t *>(&arr[0]); - num *= 1 << 8; - num |= arr[1]; - return num; -} - -inline uint16_t toUint16LE(const uint8_t *arr) -{ - uint16_t num = arr[0]; - num |= ((arr[1] << 8) & 0xFF00); - return num; -} - -#endif // COMMON_H |