diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-16 10:11:04 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-18 10:03:44 +0000 |
commit | 2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae (patch) | |
tree | 66ba7ff0b95cf5ceeda5e53294a71c6786460eb3 /compilerplugins/clang/constantparam.cxx | |
parent | add D.M.Y date pattern to Gaelic [gd-GB] (diff) | |
download | core-2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae.tar.gz core-2c8fe2e737b84ecd3dbac36a4fe6bd061bbd3bae.zip |
update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.
Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'compilerplugins/clang/constantparam.cxx')
-rw-r--r-- | compilerplugins/clang/constantparam.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx index 570cb96ca9f5..99db54554dbd 100644 --- a/compilerplugins/clang/constantparam.cxx +++ b/compilerplugins/clang/constantparam.cxx @@ -38,15 +38,8 @@ struct MyCallSiteInfo }; bool operator < (const MyCallSiteInfo &lhs, const MyCallSiteInfo &rhs) { - if (lhs.sourceLocation < rhs.sourceLocation) - return true; - else if (lhs.sourceLocation > rhs.sourceLocation) - return false; - else if (lhs.paramIndex < rhs.paramIndex) - return true; - else if (lhs.paramIndex > rhs.paramIndex) - return false; - else return lhs.callValue < rhs.callValue; + return std::tie(lhs.sourceLocation, lhs.paramIndex, lhs.callValue) + < std::tie(rhs.sourceLocation, rhs.paramIndex, rhs.callValue); } |