From 023f28630f7ed8f845eab00b137d58cc79b4445b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 16 May 2007 05:37:37 +0000 Subject: Changed xpath to use the new copy-on-write value_t. --- src/node.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/node.h') diff --git a/src/node.h b/src/node.h index cfd027fc..d394e7ee 100644 --- a/src/node.h +++ b/src/node.h @@ -116,12 +116,12 @@ public: attributes = attributes_t(); attributes->push_back(attr_pair(_name_id, value)); } - optional get_attr(const nameid_t _name_id) { + optional get_attr(const nameid_t _name_id) const { if (attributes) { typedef attributes_t::nth_index<1>::type attributes_by_name; - attributes_by_name& name_index = attributes->get<1>(); - attributes_by_name::iterator i = name_index.find(_name_id); + const attributes_by_name& name_index = attributes->get<1>(); + attributes_by_name::const_iterator i = name_index.find(_name_id); if (i != name_index.end()) return (*i).second; } -- cgit v1.2.3