diff options
-rw-r--r-- | src/cert/certstore/certstor.h | 3 | ||||
-rw-r--r-- | src/entropy/cryptoapi_rng/es_capi.h | 2 | ||||
-rw-r--r-- | src/filters/pipe.h | 2 | ||||
-rw-r--r-- | src/libstate/libstate.cpp | 2 | ||||
-rw-r--r-- | src/utils/stl_util.h | 22 |
5 files changed, 16 insertions, 15 deletions
diff --git a/src/cert/certstore/certstor.h b/src/cert/certstore/certstor.h index aaa46bd4e..374013984 100644 --- a/src/cert/certstore/certstor.h +++ b/src/cert/certstore/certstor.h @@ -50,6 +50,9 @@ class BOTAN_DLL Certificate_Store const MemoryRegion<byte>& key_id) const = 0; }; +/** +* In Memory Certificate Store +*/ class BOTAN_DLL Certificate_Store_Memory : public Certificate_Store { public: diff --git a/src/entropy/cryptoapi_rng/es_capi.h b/src/entropy/cryptoapi_rng/es_capi.h index cec7fba5e..d75101923 100644 --- a/src/entropy/cryptoapi_rng/es_capi.h +++ b/src/entropy/cryptoapi_rng/es_capi.h @@ -25,7 +25,7 @@ class Win32_CAPI_EntropySource : public EntropySource /** * Win32_Capi_Entropysource Constructor - * @provs list of providers, seperated by ':' + * @param provs list of providers, separated by ':' */ Win32_CAPI_EntropySource(const std::string& provs = ""); private: diff --git a/src/filters/pipe.h b/src/filters/pipe.h index d26f91491..e5cb5f445 100644 --- a/src/filters/pipe.h +++ b/src/filters/pipe.h @@ -25,7 +25,7 @@ namespace Botan { class BOTAN_DLL Pipe : public DataSource { public: - /* + /** * An opaque type that identifies a message in this Pipe */ typedef size_t message_id; diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index d086c5cde..076b55fcf 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -130,7 +130,7 @@ bool Library_State::is_set(const std::string& section, { Mutex_Holder lock(config_lock); - return search_map(config, section + "/" + key, false, true); + return config.count(section + "/" + key) != 0; } /* diff --git a/src/utils/stl_util.h b/src/utils/stl_util.h index 5a17f46a9..0e0617d5b 100644 --- a/src/utils/stl_util.h +++ b/src/utils/stl_util.h @@ -12,8 +12,12 @@ namespace Botan { -/* +/** * Copy-on-Predicate Algorithm +* @param current the first iterator value +* @param end the final iterator value +* @param dest an output iterator +* @param copy_p the predicate */ template<typename InputIterator, typename OutputIterator, typename Predicate> OutputIterator copy_if(InputIterator current, InputIterator end, @@ -28,8 +32,12 @@ OutputIterator copy_if(InputIterator current, InputIterator end, return dest; } -/* +/** * Searching through a std::map +* @param mapping the map to search +* @param key is what to look for +* @param null_result is the value to return if key is not in mapping +* @return mapping[key] or null_result */ template<typename K, typename V> inline V search_map(const std::map<K, V>& mapping, @@ -42,16 +50,6 @@ inline V search_map(const std::map<K, V>& mapping, return i->second; } -template<typename K, typename V, typename R> -inline R search_map(const std::map<K, V>& mapping, const K& key, - const R& null_result, const R& found_result) - { - typename std::map<K, V>::const_iterator i = mapping.find(key); - if(i == mapping.end()) - return null_result; - return found_result; - } - /** * Function adaptor for delete operation */ |