monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: a9d1085eb0df7cc8a49d22fbf80


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: a9d1085eb0df7cc8a49d22fbf80d4209cbca564d
Date: Fri, 11 Nov 2011 20:48:52 +0100 (CET)

revision:            a9d1085eb0df7cc8a49d22fbf80d4209cbca564d
date:                2011-11-11T19:37:24
author:              Richard Hopkins <address@hidden>
branch:              net.venge.monotone
changelog:
Use const_iterator instead of iterator for regex_cache

find() and end() are only used to see if an entry exists in the cache, and
have no need to modify the results.

manifest:
format_version "1"

new_manifest [d0502bbf474a89d8a300384d4c16aee55e2788bc]

old_revision [8ff9be8a9b6534d3c362b61258d724809d1e62e7]

patch "src/pcrewrap.cc"
 from [d9e2ecba7b4ce81fb9358343a510070253307424]
   to [59b11bb0076d4724c95c34840409be6d8357a68e]
============================================================
--- src/pcrewrap.cc	d9e2ecba7b4ce81fb9358343a510070253307424
+++ src/pcrewrap.cc	59b11bb0076d4724c95c34840409be6d8357a68e
@@ -80,7 +80,7 @@ public:
   class regex_cache_manager
   {
 public:
-    regex_cache::iterator find(char const * pattern)
+    regex_cache::const_iterator find(char const * pattern)
       {
         return cache.find(pattern);
       }
@@ -92,7 +92,7 @@ public:
         cache[pattern] = data;
       }
 
-    regex_cache::iterator end()
+    regex_cache::const_iterator end()
       {
         return cache.end();
       }
@@ -122,7 +122,7 @@ private:
     int erroff;
     char const * err;
     // use the cached data if we have it
-    regex_cache::iterator iter = compiled.find(pattern);
+    regex_cache::const_iterator iter = compiled.find(pattern);
     if (iter != compiled.end())
       {
         basedat = iter->second.first;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]