From 7e8c146de629b387d71a9eb5406f9e43a4640c31 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 11 Jul 2012 06:39:03 -0700 Subject: [PATCH] Constify some RecordListT methods --- components/nif/record_ptr.hpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/components/nif/record_ptr.hpp b/components/nif/record_ptr.hpp index 7e6a43f53..8f8fc244a 100644 --- a/components/nif/record_ptr.hpp +++ b/components/nif/record_ptr.hpp @@ -114,17 +114,13 @@ public: list[i].post(nif); } - X& operator[](size_t index) - { - return list.at(index).get(); - } + X& operator[](size_t index) const + { return list.at(index).get(); } - bool has(size_t index) - { - return !list.at(index).empty(); - } + bool has(size_t index) const + { return !list.at(index).empty(); } - size_t length() + size_t length() const { return list.size(); } };