Change shared_ptr for unique_ptr

This commit is contained in:
2020-04-20 10:56:54 +02:00
parent 3347d045e3
commit cdf2636974
2 changed files with 29 additions and 21 deletions
+3 -1
View File
@@ -26,7 +26,7 @@ class FastH5Writer {
uint64_t current_pulse_id_;
size_t current_frame_index_;
std::unordered_map<std::string, std::shared_ptr<char[]>> buffers_;
std::unordered_map<std::string, std::unique_ptr<char>> buffers_;
std::unordered_map<std::string, H5::DataSet> datasets_;
std::unordered_map<std::string, H5::PredType> scalar_metadata_;
@@ -44,6 +44,8 @@ public:
const std::string& device_name,
const std::string& root_folder);
virtual ~FastH5Writer();
template <class T> void add_scalar_metadata(
const std::string& metadata_name);