Added operator[] which doesn't seem to work for some reason.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "SupportDefs.h"
|
#include "SupportDefs.h"
|
||||||
|
|
||||||
namespace UDF {
|
namespace Udf {
|
||||||
|
|
||||||
/*! \brief Slightly more typesafe static array type than built-in arrays,
|
/*! \brief Slightly more typesafe static array type than built-in arrays,
|
||||||
with array length information stored implicitly (i.e. consuming no
|
with array length information stored implicitly (i.e. consuming no
|
||||||
@@ -28,8 +28,13 @@ public:
|
|||||||
for (uint32 i = 0; i < arrayLength; i++)
|
for (uint32 i = 0; i < arrayLength; i++)
|
||||||
data[i].print();
|
data[i].print();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 length() const { return arrayLength; }
|
uint32 length() const { return arrayLength; }
|
||||||
uint32 size() const { return arrayLength * sizeof(DataType); }
|
uint32 size() const { return arrayLength * sizeof(DataType); }
|
||||||
|
|
||||||
|
// This doesn't appear to work. I don't know why.
|
||||||
|
DataType operator[] (int index) const { return data[index]; }
|
||||||
|
|
||||||
DataType data[arrayLength];
|
DataType data[arrayLength];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user