aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-07-30 21:09:58 +0000
committerlloyd <[email protected]>2010-07-30 21:09:58 +0000
commit66b2ea0c063b69623ecf601027132f4a4ff366f5 (patch)
treef179369cb093a185ac5fc50aa5bba75d233d19ba /src
parentb067a61fe565161c2915cfddf316cbb45849f461 (diff)
Forbid copying an Algorithm_Factory; could easily cause double-delete,
especially in a multithreaded environment, and doesn't seem like a useful operation to support. (In principle, we could support this by adding a clone() call to Algorithm_Cache, which would in turn call clone on each of it's held prototype objects, plus adding a clone to Engine. Doesn't seem worth the bother, though.
Diffstat (limited to 'src')
-rw-r--r--src/algo_factory/algo_factory.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/algo_factory/algo_factory.h b/src/algo_factory/algo_factory.h
index f7e85202b..a35a76de3 100644
--- a/src/algo_factory/algo_factory.h
+++ b/src/algo_factory/algo_factory.h
@@ -183,6 +183,10 @@ class BOTAN_DLL Algorithm_Factory
friend class Engine_Iterator;
private:
+ Algorithm_Factory(const Algorithm_Factory&) {}
+ Algorithm_Factory& operator=(const Algorithm_Factory&)
+ { return (*this); }
+
class Engine* get_engine_n(u32bit) const;
std::vector<class Engine*> engines;