# HG changeset patch # User jwe # Date 949490319 0 # Node ID 7a23cbae0393d8bb933c67d5b6518b04a5b14627 # Parent 2dbaadac8f8685d666f246cd23a386248feb0067 [project @ 2000-02-02 11:18:39 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2000-02-02 John W. Eaton * Map.cc (index_to_CHptr): Now a macro. + (CHMap::hash): Now a member function. * defun-int.h (UNDERSCORIFY): New macro. (DEFCONST_INTERNAL, DEFCONSTX_INTERNAL): Use it. diff --git a/src/Map.cc b/src/Map.cc --- a/src/Map.cc +++ b/src/Map.cc @@ -45,8 +45,9 @@ #include "Map.h" -static unsigned int -hash (const std::string& str) +template +unsigned int +CHMap::hash (const std::string& str) const { unsigned h = 0; for (unsigned i = 0; i < str.length (); i++) diff --git a/src/Map.h b/src/Map.h --- 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