summaryrefslogtreecommitdiffhomepage
path: root/dev/ZKA/NewKit
diff options
context:
space:
mode:
Diffstat (limited to 'dev/ZKA/NewKit')
-rw-r--r--dev/ZKA/NewKit/Array.hxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/dev/ZKA/NewKit/Array.hxx b/dev/ZKA/NewKit/Array.hxx
index 9d1dc74a..7538ef02 100644
--- a/dev/ZKA/NewKit/Array.hxx
+++ b/dev/ZKA/NewKit/Array.hxx
@@ -15,8 +15,16 @@ namespace Kernel
class Array final
{
public:
- explicit Array() = default;
- ~Array() = default;
+ explicit Array()
+ {
+ for (SizeT i = 0; i < N; i++)
+ {
+ if (!fArray[i])
+ fArray[i] = T();
+ }
+ }
+
+ ~Array() = default;
Array& operator=(const Array&) = default;
Array(const Array&) = default;
@@ -28,13 +36,7 @@ namespace Kernel
Boolean Empty() const
{
- for (auto Val : fArray)
- {
- if (Val)
- return false;
- }
-
- return true;
+ return No;
}
const SizeT Capacity()