Remove use of std::unique_ptr
The Hostboot user application has poor support for std::unique_ptr,
particularly using std::unique_ptr and std::map. Their implementation of
std::map does not have support for move-only objects like
std::unique_ptr. At this time it is much easier to change the current
use to std::shared_ptr. It is not as memory efficient, but will still
work. The memory impact is minimal since we only plan to used these
for each supported chip type, which we only have a few at this point.
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
Change-Id: Ibed3e72f6f2c52fc044a442a2893fb07a3fa5d73
diff --git a/src/isolator/hei_isolation_chip.hpp b/src/isolator/hei_isolation_chip.hpp
index a7badcb..7ba7346 100644
--- a/src/isolator/hei_isolation_chip.hpp
+++ b/src/isolator/hei_isolation_chip.hpp
@@ -31,8 +31,8 @@
class IsolationChip
{
public: // Aliases
- using Ptr = std::unique_ptr<IsolationChip>;
- using ConstPtr = std::unique_ptr<const IsolationChip>;
+ using Ptr = std::shared_ptr<IsolationChip>;
+ using ConstPtr = std::shared_ptr<const IsolationChip>;
using Map = std::map<ChipType_t, const ConstPtr>;