gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/rtmp r9728: Simplify removal methods by ca


From: Bastiaan Jacques
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9728: Simplify removal methods by calling std::map's erase(key).
Date: Thu, 13 Nov 2008 05:46:27 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9728
committer: Bastiaan Jacques <address@hidden>
branch nick: rtmp
timestamp: Thu 2008-11-13 05:46:27 +0100
message:
  Simplify removal methods by calling std::map's erase(key).
modified:
  libnet/cache.cpp
=== modified file 'libnet/cache.cpp'
--- a/libnet/cache.cpp  2008-11-13 02:11:59 +0000
+++ b/libnet/cache.cpp  2008-11-13 04:46:27 +0000
@@ -57,13 +57,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
     boost::mutex::scoped_lock lock(cache_mutex);
-    map<string, string>::iterator it;
-    for (it = _pathnames.begin(); it != _pathnames.end(); it++) {
-       if (it->first == name) {
-            _pathnames.erase(it);
-            break;
-       }
-    }
+    _pathnames.erase(name);
 }
 
 void
@@ -71,13 +65,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
     boost::mutex::scoped_lock lock(cache_mutex);
-    map<string, string>::iterator it;
-    for (it = _responses.begin(); it != _responses.end(); it++) {
-       if (it->first == name) {
-            _responses.erase(it);
-            break;
-       }
-    }
+    _responses.erase(name);
 }
 
 void
@@ -85,14 +73,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
     boost::mutex::scoped_lock lock(cache_mutex);
-    map<string, DiskStream *>::iterator it;
-    for (it = _files.begin(); it != _files.end(); it++) {
-//        DiskStream *ds = it->second;
-       if (it->first == name) {
-            _files.erase(it);
-             break;
-       }
-    }
+    _files.erase(name);
 }
 
 void


reply via email to

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