Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin committed Sep 13, 2024
1 parent 4ea60c8 commit ea64f0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions include/aws/crt/checksum/CRC.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ namespace Aws
* Selects a suitable implementation based on hardware capabilities.
* Pass previousCRC32 if updating a running checksum.
*/
uint32_t AWS_CRT_CPP_API ComputeCRC32(const ByteCursor &input, uint32_t previousCRC32 = 0) noexcept;
uint32_t AWS_CRT_CPP_API ComputeCRC32(ByteCursor input, uint32_t previousCRC32 = 0) noexcept;

/**
* The entry point function to perform a Castagnoli CRC32c (iSCSI) computation.
* Selects a suitable implementation based on hardware capabilities.
* Pass previousCRC32C if updating a running checksum.
*/
uint32_t AWS_CRT_CPP_API ComputeCRC32C(const ByteCursor &input, uint32_t previousCRC32C = 0) noexcept;
uint32_t AWS_CRT_CPP_API ComputeCRC32C(ByteCursor input, uint32_t previousCRC32C = 0) noexcept;

/**
* The entry point function to perform a CRC64-NVME (a.k.a. CRC64-Rocksoft) computation.
Expand All @@ -33,7 +33,7 @@ namespace Aws
* There are many variants of CRC64 algorithms. This CRC64 variant is bit-reflected (based on
* the non bit-reflected polynomial 0xad93d23594c93659) and inverts the CRC input and output bits.
*/
uint64_t AWS_CRT_CPP_API ComputeCRC64NVME(const ByteCursor &input, uint64_t previousCRC64NVME = 0) noexcept;
uint64_t AWS_CRT_CPP_API ComputeCRC64NVME(ByteCursor input, uint64_t previousCRC64NVME = 0) noexcept;
} // namespace Checksum
} // namespace Crt
} // namespace Aws
8 changes: 4 additions & 4 deletions source/checksum/CRC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ namespace Aws
{
namespace Checksum
{
uint32_t ComputeCRC32(const ByteCursor &input, uint32_t previousCRC32) noexcept
uint32_t ComputeCRC32(ByteCursor input, uint32_t previousCRC32) noexcept
{
return aws_checksums_crc32_ex(input.ptr, input.len, previousCRC32);
}

uint32_t ComputeCRC32C(const ByteCursor &input, uint32_t previousCRC32C) noexcept
uint32_t ComputeCRC32C(ByteCursor input, uint32_t previousCRC32C) noexcept
{
return aws_checksums_crc32c_ex(input.ptr, input.len, previousCRC32C);
}

uint64_t ComputeCRC64NVME(const ByteCursor &input, uint64_t previousCRC64NVME) noexcept
uint64_t ComputeCRC64NVME(ByteCursor input, uint64_t previousCRC64NVME) noexcept
{
return aws_checksums_crc64nvme_ex(input.ptr, input.len, previousCRC64NVME);
}

} // namespace Checksum
} // namespace Crt
} // namespace Aws
} // namespace Aws

0 comments on commit ea64f0c

Please sign in to comment.