libcryfs/utils/BlockStoreUtils.cpp
2015-02-17 00:23:33 +01:00

18 lines
410 B
C++

#include <messmer/blockstore/interface/BlockStore.h>
#include <messmer/blockstore/utils/BlockStoreUtils.h>
#include <memory>
using std::unique_ptr;
namespace blockstore {
namespace utils {
unique_ptr<Block> copyToNewBlock(BlockStore *blockStore, const Block &block) {
auto newBlock = blockStore->create(block.size());
std::memcpy(newBlock->data(), block.data(), block.size());
return newBlock;
}
}
}