From 7a62a8c05ddf02073108f4117a80065d2d8ae7ec Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 18 Nov 2009 08:54:45 +0000 Subject: Remove to_string, replacing with std::to_string Convert to_u32bit to use the new C++0x library func stoul instead of hand-written code. --- src/engine/openssl/arc4_openssl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine') diff --git a/src/engine/openssl/arc4_openssl.cpp b/src/engine/openssl/arc4_openssl.cpp index 793e1faff..15bb8f98e 100644 --- a/src/engine/openssl/arc4_openssl.cpp +++ b/src/engine/openssl/arc4_openssl.cpp @@ -40,7 +40,7 @@ std::string ARC4_OpenSSL::name() const { if(SKIP == 0) return "ARC4"; if(SKIP == 256) return "MARK-4"; - else return "RC4_skip(" + to_string(SKIP) + ")"; + else return "RC4_skip(" + std::to_string(SKIP) + ")"; } /* -- cgit v1.2.3 From fcd3aba1ff6b8597b31165474573dbb339479c14 Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 13 Oct 2010 03:34:49 +0000 Subject: Post-merge fixups --- src/engine/dyn_engine/dyn_engine.cpp | 2 +- src/hash/tiger/tiger.cpp | 2 +- src/pubkey/rsa/rsa.cpp | 1 + src/utils/parsing.h | 11 ++--------- 4 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/engine') diff --git a/src/engine/dyn_engine/dyn_engine.cpp b/src/engine/dyn_engine/dyn_engine.cpp index 83169f431..f48f1a06d 100644 --- a/src/engine/dyn_engine/dyn_engine.cpp +++ b/src/engine/dyn_engine/dyn_engine.cpp @@ -35,7 +35,7 @@ Dynamically_Loaded_Engine::Dynamically_Loaded_Engine( if(mod_version != 20100908) throw std::runtime_error("Incompatible version in " + library_path + " of " + - to_string(mod_version)); + std::to_string(mod_version)); creator_func creator = lib->resolve("create_engine"); diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index 95d870857..32189952a 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -161,7 +161,7 @@ void Tiger::clear() std::string Tiger::name() const { return "Tiger(" + std::to_string(output_length()) + "," + - to_string(PASS) + ")"; + std::to_string(PASS) + ")"; } /* diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp index ebc06ddb7..2da366699 100644 --- a/src/pubkey/rsa/rsa.cpp +++ b/src/pubkey/rsa/rsa.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace Botan { diff --git a/src/utils/parsing.h b/src/utils/parsing.h index 12370bf2b..98dcd82b5 100644 --- a/src/utils/parsing.h +++ b/src/utils/parsing.h @@ -47,20 +47,13 @@ BOTAN_DLL std::vector parse_asn1_oid(const std::string& oid); BOTAN_DLL bool x500_name_cmp(const std::string& name1, const std::string& name2); -/** -* Convert a number to a string -* @param n the integer to convert to a string -* @param min_len the min length of the output string -* @return n convert to a string -*/ -BOTAN_DLL std::string to_string(u64bit n, size_t min_len = 0); - /** * Convert a string to a number * @param str the string to convert * @return number value of the string */ -BOTAN_DLL u32bit to_u32bit(const std::string& str); +inline u32bit to_u32bit(const std::string& str) + { return std::stoul(str); } /** * Convert a time specification to a number -- cgit v1.2.3