diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-10-22 04:38:58 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-10-22 04:38:58 +0300 |
commit | 9de1ad18d5305f21cb6998bdd88144893d0e121d (patch) | |
tree | a0fa5793da75584bf445e43a8a86839227ee622a /utils/gen_adldata/progs_cache.h | |
parent | 38ab46ec1945bc070e278f91ea8c49de3bba759b (diff) | |
download | libADLMIDI-9de1ad18d5305f21cb6998bdd88144893d0e121d.tar.gz libADLMIDI-9de1ad18d5305f21cb6998bdd88144893d0e121d.tar.bz2 libADLMIDI-9de1ad18d5305f21cb6998bdd88144893d0e121d.zip |
Fix MSVC CMake compilation
TODO: Fix a freaking MSVC's "invalid comparator" assert given by std::map::lower_bound() call
Diffstat (limited to 'utils/gen_adldata/progs_cache.h')
-rw-r--r-- | utils/gen_adldata/progs_cache.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/gen_adldata/progs_cache.h b/utils/gen_adldata/progs_cache.h index 9918e82..b0e63a4 100644 --- a/utils/gen_adldata/progs_cache.h +++ b/utils/gen_adldata/progs_cache.h @@ -17,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; @@ -27,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); } }; |