diff options
author | lloyd <[email protected]> | 2008-11-10 20:14:38 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 20:14:38 +0000 |
commit | 9d529fb82a301f14b9cb0efb6c69c1fdb9c984e2 (patch) | |
tree | e9e6b69cfd6ef13e3554b638206d7faa1d6a55a3 /src/libstate/lookup.cpp | |
parent | 148c4ecbd4116f9420229853b567cc17310b1cd1 (diff) |
Have Algorithm_Factory::make_hash_function throw an exception if it can't
find an object to clone.
Add a new constructor to Hash_Filter taking a HashFunction*
Diffstat (limited to 'src/libstate/lookup.cpp')
-rw-r--r-- | src/libstate/lookup.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libstate/lookup.cpp b/src/libstate/lookup.cpp index d8fab625b..52e986ff2 100644 --- a/src/libstate/lookup.cpp +++ b/src/libstate/lookup.cpp @@ -23,13 +23,7 @@ const HashFunction* retrieve_hash(Library_State& libstate, *************************************************/ HashFunction* get_hash(const std::string& algo_spec) { - const HashFunction* hash = - global_state().algo_factory().prototype_hash_function(algo_spec); - - if(hash) - return hash->clone(); - - throw Algorithm_Not_Found(algo_spec); + return global_state().algo_factory().make_hash_function(algo_spec); } /************************************************* |