Browse Source

Use friend class instead of protected members.

The reference got cluttered after I changed the private members to
protected.
tags/0.6.0
tastytea 6 months ago
parent
commit
8bb322edb9
Signed by: tastytea <tastytea@tastytea.de> GPG Key ID: CFC39497F1B26E07
3 changed files with 4 additions and 3 deletions
  1. 2
    1
      src/identiconpp.hpp
  2. 1
    1
      src/tests/test_checks_entropy.cpp
  3. 1
    1
      src/tests/test_checks_hex.cpp

+ 2
- 1
src/identiconpp.hpp View File

@@ -42,6 +42,7 @@ using std::array;
42 42
 class Identiconpp
43 43
 {
44 44
 public:
45
+    friend class Testiconpp;
45 46
     /*!
46 47
      * @brief  List of identicon algorithms
47 48
      */
@@ -89,7 +90,7 @@ public:
89 90
      */
90 91
     Magick::Image generate(const string &digest, const uint16_t width = 100);
91 92
 
92
-protected:
93
+private:
93 94
     const uint8_t _rows;
94 95
     const uint8_t _columns;
95 96
     const algorithm _type;

+ 1
- 1
src/tests/test_checks_entropy.cpp View File

@@ -6,7 +6,7 @@
6 6
 
7 7
 using std::string;
8 8
 
9
-class Testiconpp : protected Identiconpp
9
+class Testiconpp : private Identiconpp
10 10
 {
11 11
 public:
12 12
     explicit Testiconpp(const uint8_t columns, const uint8_t rows,

+ 1
- 1
src/tests/test_checks_hex.cpp View File

@@ -6,7 +6,7 @@
6 6
 
7 7
 using std::string;
8 8
 
9
-class Testiconpp : protected Identiconpp
9
+class Testiconpp : private Identiconpp
10 10
 {
11 11
 public:
12 12
     explicit Testiconpp()

Loading…
Cancel
Save