lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [4903] Replace a weird with a canonical idiom


From: Greg Chicares
Subject: [lmi-commits] [4903] Replace a weird with a canonical idiom
Date: Wed, 05 May 2010 14:27:25 +0000

Revision: 4903
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4903
Author:   chicares
Date:     2010-05-05 14:27:25 +0000 (Wed, 05 May 2010)
Log Message:
-----------
Replace a weird with a canonical idiom

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/dbdict.cpp
    lmi/trunk/dbdict.hpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-05-05 13:56:22 UTC (rev 4902)
+++ lmi/trunk/ChangeLog 2010-05-05 14:27:25 UTC (rev 4903)
@@ -25390,3 +25390,9 @@
   dbdict.hpp
 Rework caching implementation.
 
+20100505T1427Z <address@hidden> [718]
+
+  dbdict.cpp
+  dbdict.hpp
+Replace a weird with a canonical idiom.
+

Modified: lmi/trunk/dbdict.cpp
===================================================================
--- lmi/trunk/dbdict.cpp        2010-05-05 13:56:22 UTC (rev 4902)
+++ lmi/trunk/dbdict.cpp        2010-05-05 14:27:25 UTC (rev 4903)
@@ -216,11 +216,11 @@
     document.save(path.string());
 }
 
-//===========================================================================
+/// Add an entry to the dictionary.
+
 void DBDictionary::Add(TDBValue const& e)
 {
-    dictionary_.erase(e.GetKey());
-    dictionary_.insert(dict_map_val(e.GetKey(), e));
+    dictionary_[e.GetKey()] = e;
 }
 
 /// Initialize all database entities to not-necessarily-plausible values.

Modified: lmi/trunk/dbdict.hpp
===================================================================
--- lmi/trunk/dbdict.hpp        2010-05-05 13:56:22 UTC (rev 4902)
+++ lmi/trunk/dbdict.hpp        2010-05-05 14:27:25 UTC (rev 4903)
@@ -36,7 +36,6 @@
 #include <string>
 
 typedef std::map<int, TDBValue> dict_map;
-typedef dict_map::value_type dict_map_val;
 
 /// Cached product database.
 





reply via email to

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