From: Richard W.M. Jones Date: Wed, 26 Nov 2014 15:37:26 +0000 (+0000) Subject: ranges: const-correctness X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=5efcc16361abd1f45ae2f326dad0535cf3c344e9;p=virt-bmap.git ranges: const-correctness --- diff --git a/ranges.cpp b/ranges.cpp index 46b48ae..4b2535f 100644 --- a/ranges.cpp +++ b/ranges.cpp @@ -82,14 +82,14 @@ iter_range (void *mapv, void (*f) (uint64_t start, uint64_t end, const char *obj extern "C" void find_range (void *mapv, uint64_t start, uint64_t end, void (*f) (uint64_t start, uint64_t end, const char *object, void *opaque), void *opaque) { - ranges *map = (ranges *) mapv; + const ranges *map = (const ranges *) mapv; boost::icl::interval::type window; window = boost::icl::interval::right_open (start, end); - ranges r = *map & window; + const ranges r = *map & window; - ranges::iterator iter = r.begin (); + ranges::const_iterator iter = r.begin (); while (iter != r.end ()) { boost::icl::interval::type range = iter->first; uint64_t start = range.lower ();