From 684a9c6cbf8501b9fbc8d8fda2fcb29a508848d0 Mon Sep 17 00:00:00 2001 From: Andrew Potter Date: Tue, 26 May 2009 17:23:34 -0700 Subject: [PATCH] Fix pointer const-ness in parse_tags() --- src/item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/item.cc b/src/item.cc index 0f9b1dc8..758ce254 100644 --- a/src/item.cc +++ b/src/item.cc @@ -116,8 +116,8 @@ void item_t::set_tag(const string& tag, void item_t::parse_tags(const char * p, int current_year) { - if (char * b = std::strchr(p, '[')) { - if (char * e = std::strchr(p, ']')) { + if (const char * b = std::strchr(p, '[')) { + if (const char * e = std::strchr(p, ']')) { char buf[256]; std::strncpy(buf, b + 1, e - b - 1); buf[e - b - 1] = '\0';