updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
@ -74,21 +74,21 @@ public:
|
||||
|
||||
[[nodiscard]] auto truncate(std::size_t size) -> bool;
|
||||
|
||||
#if defined(PROJECT_ENABLE_JSON)
|
||||
[[nodiscard]] auto write(const nlohmann::json &data,
|
||||
std::size_t *total_written = nullptr) -> bool {
|
||||
auto str_data = data.dump();
|
||||
return write_(reinterpret_cast<const unsigned char *>(str_data.c_str()),
|
||||
str_data.size(), 0U, total_written);
|
||||
}
|
||||
#endif // defined(PROJECT_ENABLE_JSON)
|
||||
|
||||
[[nodiscard]] auto write(const data_buffer &data, std::uint64_t offset,
|
||||
std::size_t *total_written = nullptr) -> bool {
|
||||
return write_(reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size(), offset, total_written);
|
||||
}
|
||||
|
||||
#if defined(PROJECT_ENABLE_JSON)
|
||||
[[nodiscard]] auto write_json(const nlohmann::json &data,
|
||||
std::size_t *total_written = nullptr) -> bool {
|
||||
auto str_data = data.dump();
|
||||
return write_(reinterpret_cast<const unsigned char *>(str_data.c_str()),
|
||||
str_data.size(), 0U, total_written);
|
||||
}
|
||||
#endif // defined(PROJECT_ENABLE_JSON)
|
||||
|
||||
[[nodiscard]] operator bool() const { return stream_.is_open(); }
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user