diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-10-31 03:42:37 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-10-31 03:42:37 +0300 |
commit | 634fefa614f29056e5b4dadc1e4db9ce61d49e59 (patch) | |
tree | 1dfd49be726113898395449ae337308f138e43aa /utils/gen_adldata/progs_cache.h | |
parent | 78b48a4f7250f94b62a5c995f8c714804bb66eef (diff) | |
parent | 24f30e137009fda5262c6465742fb997a1ef8e8f (diff) | |
download | libADLMIDI-634fefa614f29056e5b4dadc1e4db9ce61d49e59.tar.gz libADLMIDI-634fefa614f29056e5b4dadc1e4db9ce61d49e59.tar.bz2 libADLMIDI-634fefa614f29056e5b4dadc1e4db9ce61d49e59.zip |
Merge branch 'master' into seekability
# Conflicts:
# libADLMIDI-test.pro
# src/adlmidi.cpp
# src/adlmidi_private.hpp
Diffstat (limited to 'utils/gen_adldata/progs_cache.h')
-rw-r--r-- | utils/gen_adldata/progs_cache.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/utils/gen_adldata/progs_cache.h b/utils/gen_adldata/progs_cache.h index 007c3b4..b0e63a4 100644 --- a/utils/gen_adldata/progs_cache.h +++ b/utils/gen_adldata/progs_cache.h @@ -7,6 +7,7 @@ #include <memory> #include <cstring> #include <cstdint> +#include <string> #include <vector> struct insdata @@ -16,9 +17,13 @@ struct insdata bool diff; bool operator==(const insdata &b) const { - return std::memcmp(data, b.data, 11) == 0 && finetune == b.finetune && diff == b.diff; + return (std::memcmp(data, b.data, 11) == 0) && (finetune == b.finetune) && (diff == b.diff); } - bool operator< (const insdata &b) const + bool operator!=(const insdata &b) const + { + return !operator==(b); + } + bool operator<(const insdata &b) const { int c = std::memcmp(data, b.data, 11); if(c != 0) return c < 0; @@ -26,9 +31,9 @@ struct insdata if(diff != b.diff) return (!diff) == (b.diff); return 0; } - bool operator!=(const insdata &b) const + bool operator>(const insdata &b) const { - return !operator==(b); + return !operator<(b) && operator!=(b); } }; @@ -79,7 +84,7 @@ extern std::vector<std::string> banknames; void SetBank(unsigned bank, unsigned patch, size_t insno); size_t InsertIns(const insdata &id, const insdata &id2, ins &in, - const std::string &name, const std::string &name2 = ""); + const std::string &name, const std::string &name2); size_t InsertNoSoundIns(); #endif // PROGS_H |