|
2 | 2 |
|
3 | 3 | #include "openPMD/DatatypeMacros.hpp" |
4 | 4 | #include "openPMD/IO/JSON/JSONIOHandlerImpl.hpp" |
| 5 | +#include "openPMD/auxiliary/Memory.hpp" |
5 | 6 | #include "openPMD/auxiliary/StringManip.hpp" |
6 | 7 |
|
7 | 8 | #include <nlohmann/json.hpp> |
@@ -74,7 +75,7 @@ auto ExternalBlockStorage::store( |
74 | 75 | nlohmann::json &fullJsonDataset, |
75 | 76 | nlohmann::json::json_pointer const &path, |
76 | 77 | std::optional<std::string> infix, |
77 | | - T const *data) -> std::string |
| 78 | + auxiliary::WriteBuffer data) -> std::string |
78 | 79 | { |
79 | 80 | auto &dataset = fullJsonDataset[path]; |
80 | 81 |
|
@@ -154,7 +155,7 @@ auto ExternalBlockStorage::store( |
154 | 155 | filesystem_identifier << "--" << index_as_str; |
155 | 156 | auto escaped_filesystem_identifier = m_worker->put( |
156 | 157 | filesystem_identifier.str(), |
157 | | - data, |
| 158 | + std::move(data), |
158 | 159 | sizeof(T) * flat_extent(blockExtent)); |
159 | 160 | block["external_ref"] = escaped_filesystem_identifier; |
160 | 161 | return index_as_str; |
@@ -250,7 +251,7 @@ void ExternalBlockStorage::sanitizeString(std::string &s) |
250 | 251 | nlohmann::json &fullJsonDataset, \ |
251 | 252 | nlohmann::json::json_pointer const &path, \ |
252 | 253 | std::optional<std::string> infix, \ |
253 | | - type const *data) -> std::string; \ |
| 254 | + auxiliary::WriteBuffer) -> std::string; \ |
254 | 255 | template void ExternalBlockStorage::read<datatypehandling, type>( \ |
255 | 256 | std::string const &identifier, \ |
256 | 257 | nlohmann::json const &fullJsonDataset, \ |
|
0 commit comments