aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libstate/libstate.cpp18
-rw-r--r--src/libstate/libstate.h3
2 files changed, 11 insertions, 10 deletions
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index 14b63293c..b5e5d0de1 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -221,9 +221,9 @@ Return a reference to the Algorithm_Factory
*/
Algorithm_Factory& Library_State::algo_factory()
{
- if(!algorithm_factory)
+ if(!m_algorithm_factory)
throw Invalid_State("Uninitialized in Library_State::algo_factory");
- return *algorithm_factory;
+ return *m_algorithm_factory;
}
/*************************************************
@@ -267,21 +267,21 @@ void Library_State::initialize(bool thread_safe)
load_default_config();
- algorithm_factory = new Algorithm_Factory;
+ m_algorithm_factory = new Algorithm_Factory;
#if defined(BOTAN_HAS_ENGINE_GNU_MP)
- algorithm_factory->add_engine(new GMP_Engine);
+ m_algorithm_factory->add_engine(new GMP_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_OPENSSL)
- algorithm_factory->add_engine(new OpenSSL_Engine);
+ m_algorithm_factory->add_engine(new OpenSSL_Engine);
#endif
#if defined(BOTAN_HAS_ENGINE_ASSEMBLER)
- algorithm_factory->add_engine(new Assembler_Engine);
+ m_algorithm_factory->add_engine(new Assembler_Engine);
#endif
- algorithm_factory->add_engine(new Default_Engine);
+ m_algorithm_factory->add_engine(new Default_Engine);
}
/**
@@ -289,7 +289,7 @@ void Library_State::initialize(bool thread_safe)
*/
void Library_State::add_engine(Engine* engine)
{
- algorithm_factory->add_engine(engine);
+ m_algorithm_factory->add_engine(engine);
}
/*************************************************
@@ -308,7 +308,7 @@ Library_State::Library_State()
*************************************************/
Library_State::~Library_State()
{
- delete algorithm_factory;
+ delete m_algorithm_factory;
cached_default_allocator = 0;
diff --git a/src/libstate/libstate.h b/src/libstate/libstate.h
index 3ca97a53c..ac500b42f 100644
--- a/src/libstate/libstate.h
+++ b/src/libstate/libstate.h
@@ -28,6 +28,7 @@ class BOTAN_DLL Library_State
void initialize(bool thread_safe);
Algorithm_Factory& algo_factory();
+ Algorithm_Factory& algorithm_factory() { return algo_factory(); }
void add_engine(class Engine*);
@@ -110,7 +111,7 @@ class BOTAN_DLL Library_State
mutable Allocator* cached_default_allocator;
std::vector<Allocator*> allocators;
- Algorithm_Factory* algorithm_factory;
+ Algorithm_Factory* m_algorithm_factory;
};
/*************************************************