Additional Clang warning fixes

This commit is contained in:
Peter Dimov committed 2021-12-16 05:25:03 +02:00
1 parent e47b6a51e4
commit 61479788b8
4 files changed
+10 -6

No files matched your search

+4 -2
View File
@@ -7,8 +7,10 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#if defined(__clang__) #if defined(__clang__) && defined(__has_warning)
# pragma clang diagnostic ignored "-Wself-assign-overloaded" # if __has_warning( "-Wself-assign-overloaded" )
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
# endif
#endif #endif
#include <boost/function.hpp> #include <boost/function.hpp>
+4 -2
View File
@@ -7,8 +7,10 @@
// For more information, see http://www.boost.org // For more information, see http://www.boost.org
#if defined(__clang__) #if defined(__clang__) && defined(__has_warning)
# pragma clang diagnostic ignored "-Wself-assign-overloaded" # if __has_warning( "-Wself-assign-overloaded" )
# pragma clang diagnostic ignored "-Wself-assign-overloaded"
# endif
#endif #endif
#include <boost/function.hpp> #include <boost/function.hpp>
+1 -1
View File
@@ -16,7 +16,7 @@
struct Y { struct Y {
Y(int y = 0) : y_(y) {} Y(int y = 0) : y_(y) {}
bool operator==(const Y& rhs) { return y_ == rhs.y_; } bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
private: private:
int y_; int y_;
}; };
+1 -1
View File
@@ -16,7 +16,7 @@
struct Y { struct Y {
Y(int y = 0) : y_(y) {} Y(int y = 0) : y_(y) {}
bool operator==(const Y& rhs) { return y_ == rhs.y_; } bool operator==(const Y& rhs) const { return y_ == rhs.y_; }
private: private:
int y_; int y_;
}; };