summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkedTree.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLinkedTree.h')
-rw-r--r--Source/cmLinkedTree.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmLinkedTree.h b/Source/cmLinkedTree.h
index d2339c4..df00b30 100644
--- a/Source/cmLinkedTree.h
+++ b/Source/cmLinkedTree.h
@@ -87,6 +87,24 @@ public:
return this->Tree->GetPointer(this->Position - 1);
}
+ ReferenceType operator*() const
+ {
+ assert(this->Tree);
+ assert(this->Tree->UpPositions.size() == this->Tree->Data.size());
+ assert(this->Position <= this->Tree->Data.size());
+ assert(this->Position > 0);
+ return this->Tree->GetReference(this->Position - 1);
+ }
+
+ ReferenceType operator*()
+ {
+ assert(this->Tree);
+ assert(this->Tree->UpPositions.size() == this->Tree->Data.size());
+ assert(this->Position <= this->Tree->Data.size());
+ assert(this->Position > 0);
+ return this->Tree->GetReference(this->Position - 1);
+ }
+
bool operator==(iterator other) const
{
assert(this->Tree);