Hi Petr,
70 Q_ASSERT (static_cast
71 // This should never happen at it’s here only to enforce array size
72 // invariant even in release mode.
73 // \todo Keep it or remove?
74 array.resize (Size);
That’s great! Keep it!
114 //! \returns Size of stored array.
115 uint size() const
116 {
117 return Size;
118 }
119
120 //! \returns Size of array that could be stored in this class.
121 static uint arraySize()
122 {
123 return Size;
124 }
Why two functions when
CPPUNIT_ASSERT (array.size() == 11);
works? The compiler will always be able to determine the object type and will know how to call the function. I could be missing something though…
Regards,
Peter
