changeset 3530:7a23cbae0393

[project @ 2000-02-02 11:18:39 by jwe]
author jwe
date Wed, 02 Feb 2000 11:18:39 +0000
parents 2dbaadac8f86
children 97cf542676e1
files src/ChangeLog src/Map.cc src/Map.h
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
 2000-02-02  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* Map.cc (index_to_CHptr): Now a macro.
+	(CHMap<C>::hash): Now a member function.
 
 	* defun-int.h (UNDERSCORIFY): New macro.
 	(DEFCONST_INTERNAL, DEFCONSTX_INTERNAL): Use it.
--- a/src/Map.cc
+++ b/src/Map.cc
@@ -45,8 +45,9 @@
 
 #include "Map.h"
 
-static unsigned int
-hash (const std::string& str)
+template <class C>
+unsigned int
+CHMap<C>::hash (const std::string& str) const
 {
   unsigned h = 0;
   for (unsigned i = 0; i < str.length (); i++)
--- a/src/Map.h
+++ b/src/Map.h
@@ -151,6 +151,8 @@
 
   void clear (void);
   int  OK (void) const;
+
+  unsigned int hash (const std::string& str) const;
 };
 
 #endif