fix by some comments
This commit is contained in:
@@ -1261,8 +1261,8 @@ void MemCopy64(char* dst, const void* src, size_t size) {
|
|||||||
// RVV acceleration available on RISC-V when compiled with -march=rv64gcv
|
// RVV acceleration available on RISC-V when compiled with -march=rv64gcv
|
||||||
#elif defined(__riscv) && SNAPPY_HAVE_RVV
|
#elif defined(__riscv) && SNAPPY_HAVE_RVV
|
||||||
// Cast pointers to the type we will operate on.
|
// Cast pointers to the type we will operate on.
|
||||||
unsigned char* dst_ptr = (unsigned char*)dst;
|
unsigned char* dst_ptr = reinterpret_cast<unsigned char*>(dst);
|
||||||
const unsigned char* src_ptr = (const unsigned char*)src;
|
const unsigned char* src_ptr = reinterpret_cast<const unsigned char*>(src);
|
||||||
size_t remaining_bytes = size;
|
size_t remaining_bytes = size;
|
||||||
// Loop as long as there are bytes remaining to be copied.
|
// Loop as long as there are bytes remaining to be copied.
|
||||||
while (remaining_bytes > 0) {
|
while (remaining_bytes > 0) {
|
||||||
@@ -1285,7 +1285,7 @@ void MemCopy64(char* dst, const void* src, size_t size) {
|
|||||||
if (SNAPPY_PREDICT_FALSE(size > kShortMemCopy)) {
|
if (SNAPPY_PREDICT_FALSE(size > kShortMemCopy)) {
|
||||||
std::memmove(dst + kShortMemCopy,
|
std::memmove(dst + kShortMemCopy,
|
||||||
static_cast<const uint8_t*>(src) + kShortMemCopy,
|
static_cast<const uint8_t*>(src) + kShortMemCopy,
|
||||||
64 - kShortMemCopy);}
|
64 - kShortMemCopy);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user