diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-10-23 22:25:15 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-10-23 22:25:15 +0300 |
commit | 5e566534205655c89d6c9256e4419c7502339a49 (patch) | |
tree | 51861634556de481478cdcaf94c1b649105df6b0 /utils/gen_adldata/progs_cache.h | |
parent | a8dde37099558dc805dfa07eb870c2baf66f4fec (diff) | |
parent | 9de1ad18d5305f21cb6998bdd88144893d0e121d (diff) | |
download | libADLMIDI-5e566534205655c89d6c9256e4419c7502339a49.tar.gz libADLMIDI-5e566534205655c89d6c9256e4419c7502339a49.tar.bz2 libADLMIDI-5e566534205655c89d6c9256e4419c7502339a49.zip |
Merge branch 'master' of github.com:Wohlstand/libADLMIDI
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 |