summaryrefslogtreecommitdiff
path: root/src/node.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-05-16 05:37:37 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:52 -0400
commit023f28630f7ed8f845eab00b137d58cc79b4445b (patch)
treee48c55fa1e87f5b34c00cbca7aac334c97c9e7f0 /src/node.h
parent52822604713b73160ac497bc170eb45d9a594306 (diff)
downloadfork-ledger-023f28630f7ed8f845eab00b137d58cc79b4445b.tar.gz
fork-ledger-023f28630f7ed8f845eab00b137d58cc79b4445b.tar.bz2
fork-ledger-023f28630f7ed8f845eab00b137d58cc79b4445b.zip
Changed xpath to use the new copy-on-write value_t.
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h6
1 files changed, 3 insertions, 3 deletions
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<const string&> get_attr(const nameid_t _name_id) {
+ optional<const string&> 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;
}