Fix clang warnings. (#9447)

- static function in header. (which is marked as unused due to translation unit
visibility).
- Implicit copy operator is deprecated.
- Unused lambda capture.
- Moving a temporary variable prevents copy elision.
This commit is contained in:
Jiaming Yuan
2023-08-09 15:34:45 +08:00
committed by GitHub
parent 819098a48f
commit f05294a6f2
5 changed files with 12 additions and 29 deletions

View File

@@ -134,12 +134,6 @@ inline float LogSum(Iterator begin, Iterator end) {
return mx + std::log(sum);
}
// comparator functions for sorting pairs in descending order
inline static bool CmpFirst(const std::pair<float, unsigned> &a,
const std::pair<float, unsigned> &b) {
return a.first > b.first;
}
// Redefined here to workaround a VC bug that doesn't support overloading for integer
// types.
template <typename T>