mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-16 08:30:05 +00:00
6467b01de2
We can just reserve the memory then perform successive insertions instead of needing to use memcpy. This also avoids the need to zero out the output vector's memory before performing the insertions. We can also std::move the output std::vector into the destination so that we don't need to make a completely new copy of the vector, getting rid of an unnecessary allocation. Additionally, we can use iterators to determine the beginning and end ranges of the std::vector instances that comprise the output vector, as the end of one range just becomes the beginning for the next successive range, and since std::vector's iterator constructor copies data within the range [begin, end), this is more straightforward and gets rid of the need to have an offset variable that keeps getting incremented to determine where to do the next std::memcpy. |
||
---|---|---|
.. | ||
aes_util.cpp | ||
aes_util.h | ||
ctr_encryption_layer.cpp | ||
ctr_encryption_layer.h | ||
encryption_layer.cpp | ||
encryption_layer.h | ||
key_manager.cpp | ||
key_manager.h | ||
partition_data_manager.cpp | ||
partition_data_manager.h | ||
sha_util.cpp | ||
sha_util.h | ||
xts_encryption_layer.cpp | ||
xts_encryption_layer.h |