diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-07-03 18:14:16 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-07-03 18:14:16 +0200 |
commit | 5dadaf2c7b086075bf3a3418d419cecf20390666 (patch) | |
tree | 6afc6eb594c9909a40483483a8e63e0f830217cc | |
parent | 06fabac512bf81164d5b01f877927cb39e9db864 (diff) | |
download | sigc++-5dadaf2c7b086075bf3a3418d419cecf20390666.tar.gz |
tests/test_track_obj: Fix for clang++
clang++ complains if private members are unused, so make them protected.
error: private field 'bar_' is not used [-Werror,-Wunused-private-field]
-rw-r--r-- | tests/test_track_obj.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_track_obj.cc b/tests/test_track_obj.cc index b0f6e9e..6c1fa24 100644 --- a/tests/test_track_obj.cc +++ b/tests/test_track_obj.cc @@ -21,8 +21,8 @@ // - Show that a slot with a C++11 lambda expression can be automatically // disconnected when an object derived from sigc::trackable is deleted, // provided sigc::track_obj() is used. -// It's shown here as a preparation for deprecating and eventually -// deleting the libsigc++ lambda expressions. +// It shows that C++11 lambda expressions can replace the libsigc++ lambda +// expressions, which have been removed. // See https://bugzilla.gnome.org/show_bug.cgi?id=672555 // - Test the code example in the documentation in sigc++/adaptors/track_obj.h. // @@ -72,7 +72,8 @@ public: return (i<0) ? "negative" : ((i>0) ? "positive" : "zero"); } -private: +protected: + // Don't make it private. clang++ does not like unused private data. const bar_group4& bar_; }; @@ -92,8 +93,10 @@ public: return result; } -private: +protected: + // Don't make it private. clang++ does not like unused private data. const bar_group4& bar_; +private: const book& aBook_; }; |