diff options
author | Jack Lloyd <[email protected]> | 2016-11-03 00:09:57 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-03 00:09:57 -0400 |
commit | 0c1900d1d86c7a8928d29d162e33da49aa55b0f9 (patch) | |
tree | ea2e1bc00082163e8c349a66707de650a96f7280 | |
parent | e5e87be4d7767ce6894dfa8d9335b3d02593d401 (diff) |
Deprecate LibraryInitializer
Now that #668 is landed I'm comfortable that we will not need
any type of global init.
-rw-r--r-- | news.rst | 3 | ||||
-rw-r--r-- | src/lib/base/init.cpp | 23 | ||||
-rw-r--r-- | src/lib/base/init.h | 9 |
3 files changed, 7 insertions, 28 deletions
@@ -59,6 +59,9 @@ Version 1.11.34, Not Yet Released * Add support to output bakefiles with new `configure.py` option `--with-bakefile`. Bakefile creates Visual Studio or Xcode project files for example. +* The LibraryInitializer type, which has been a no-op since 1.11.14, + is now officially deprecated. + Version 1.11.33, 2016-10-26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/lib/base/init.cpp b/src/lib/base/init.cpp deleted file mode 100644 index 1befc34d2..000000000 --- a/src/lib/base/init.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -* (C) 2015 Jack Lloyd -* -* Botan is released under the Simplified BSD License (see license.txt) -*/ - -#include <botan/init.h> - -namespace Botan { - -//static -void LibraryInitializer::initialize(const std::string&) - { - // none needed currently - } - -//static -void LibraryInitializer::deinitialize() - { - // none needed currently - } - -} diff --git a/src/lib/base/init.h b/src/lib/base/init.h index 7709883af..30798b4d5 100644 --- a/src/lib/base/init.h +++ b/src/lib/base/init.h @@ -19,14 +19,13 @@ namespace Botan { * case, and this class is no longer needed and kept only for backwards * compatibility. */ -class BOTAN_DLL LibraryInitializer +class BOTAN_DLL BOTAN_DEPRECATED("LibraryInitializer is no longer required") LibraryInitializer { public: - explicit LibraryInitializer(const std::string& s = "") { initialize(s); } - ~LibraryInitializer() { deinitialize(); } + explicit LibraryInitializer(const std::string& /*ignored*/ = "") { } - static void initialize(const std::string& = ""); - static void deinitialize(); + static void initialize(const std::string& /*ignored*/ = "") {} + static void deinitialize() {} }; } |