From 1aae1e5b7d8ee26c626c126fa64392a5ef949f42 Mon Sep 17 00:00:00 2001 From: guyingzhao Date: Sun, 6 Apr 2025 12:37:05 +0200 Subject: C++: Add f/Front() and b/Back() to Array to access first/last element --- include/plist/Array.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/plist/Array.h b/include/plist/Array.h index 949fa4c..f4360c5 100644 --- a/include/plist/Array.h +++ b/include/plist/Array.h @@ -43,6 +43,10 @@ public : typedef std::vector::const_iterator const_iterator; Node* operator[](unsigned int index); + Node* Back(); + Node* back(); + Node* Front(); + Node* front(); iterator Begin(); iterator begin(); iterator End(); -- cgit v1.1-32-gdbae