From 8bb322edb9705268a4d0f01b878dc562108d7d5f Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 4 Jan 2019 20:07:11 +0100 Subject: [PATCH] Use friend class instead of protected members. The reference got cluttered after I changed the private members to protected. --- src/identiconpp.hpp | 3 ++- src/tests/test_checks_entropy.cpp | 2 +- src/tests/test_checks_hex.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/identiconpp.hpp b/src/identiconpp.hpp index 8170234..f5517e7 100644 --- a/src/identiconpp.hpp +++ b/src/identiconpp.hpp @@ -42,6 +42,7 @@ using std::array; class Identiconpp { public: + friend class Testiconpp; /*! * @brief List of identicon algorithms */ @@ -89,7 +90,7 @@ public: */ Magick::Image generate(const string &digest, const uint16_t width = 100); -protected: +private: const uint8_t _rows; const uint8_t _columns; const algorithm _type; diff --git a/src/tests/test_checks_entropy.cpp b/src/tests/test_checks_entropy.cpp index 72000da..c15d3c4 100644 --- a/src/tests/test_checks_entropy.cpp +++ b/src/tests/test_checks_entropy.cpp @@ -6,7 +6,7 @@ using std::string; -class Testiconpp : protected Identiconpp +class Testiconpp : private Identiconpp { public: explicit Testiconpp(const uint8_t columns, const uint8_t rows, diff --git a/src/tests/test_checks_hex.cpp b/src/tests/test_checks_hex.cpp index 27c0c6e..c438b06 100644 --- a/src/tests/test_checks_hex.cpp +++ b/src/tests/test_checks_hex.cpp @@ -6,7 +6,7 @@ using std::string; -class Testiconpp : protected Identiconpp +class Testiconpp : private Identiconpp { public: explicit Testiconpp()