diff options
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); } }; |