[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [4935] Prefer map_lookup() for map lookups
From: |
Greg Chicares |
Subject: |
[lmi-commits] [4935] Prefer map_lookup() for map lookups |
Date: |
Sun, 09 May 2010 12:22:47 +0000 |
Revision: 4935
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4935
Author: chicares
Date: 2010-05-09 12:22:45 +0000 (Sun, 09 May 2010)
Log Message:
-----------
Prefer map_lookup() for map lookups
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/database.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-05-09 12:21:40 UTC (rev 4934)
+++ lmi/trunk/ChangeLog 2010-05-09 12:22:45 UTC (rev 4935)
@@ -25623,3 +25623,18 @@
database.cpp
Remove old markup and questions answered in merge.
+20100509T1035Z <address@hidden> [706]
+
+ database.hpp
+Remove two disused member declarations.
+
+20100509T1221Z <address@hidden> [706]
+
+ map_lookup.hpp
+Improve documentation.
+
+20100509T1222Z <address@hidden> [706]
+
+ database.cpp
+Prefer map_lookup() for map lookups.
+
Modified: lmi/trunk/database.cpp
===================================================================
--- lmi/trunk/database.cpp 2010-05-09 12:21:40 UTC (rev 4934)
+++ lmi/trunk/database.cpp 2010-05-09 12:22:45 UTC (rev 4935)
@@ -35,6 +35,7 @@
#include "dbnames.hpp"
#include "dbvalue.hpp"
#include "lmi.hpp" // is_antediluvian_fork()
+#include "map_lookup.hpp"
#include "oecumenic_enumerations.hpp" // methuselah
#include "product_data.hpp"
#include "yare_input.hpp"
@@ -206,12 +207,9 @@
database_entity const& product_database::GetEntry(int k) const
{
dict_map const& d = DBDictionary::instance().GetDictionary();
- LMI_ASSERT(d.size() == GetDBNames().size());
LMI_ASSERT(d.size() == DB_LAST);
LMI_ASSERT(0 == DB_FIRST);
LMI_ASSERT(DB_FIRST <= k && k < DB_LAST);
- dict_map::const_iterator i = d.find(k);
- LMI_ASSERT(i != d.end());
- return i->second;
+ return map_lookup(d, k);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [4935] Prefer map_lookup() for map lookups,
Greg Chicares <=