Skip to content

Commit

Permalink
#ifdef -> #if defined()
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnall committed Sep 6, 2024
1 parent d3d60ac commit 1c51f87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/crc32c/crc32c.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ inline uint32_t Crc32c(const char* data, size_t count) {
return Extend(0, reinterpret_cast<const uint8_t*>(data), count);
}

#ifdef __cpp_lib_byte
#if defined(__cpp_lib_byte)
// Computes the CRC32C of "count" bytes in the buffer pointed by "data".
inline uint32_t Crc32c(const std::byte* data, size_t count) {
return Extend(0, reinterpret_cast<const uint8_t*>(data), count);
}
#endif
#endif // defined(__cpp_lib_byte)

// Computes the CRC32C of the string's content.
inline uint32_t Crc32c(const std::string& string) {
Expand Down

0 comments on commit 1c51f87

Please sign in to comment.