Skip to content

Commit

Permalink
fix: now can be constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
braindigitalis committed Oct 11, 2024
1 parent c376d6f commit 1d0c5eb
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/dpp/voice/enabled/xchacha20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
#include <cstdint>
#include <dpp/exception.h>
#include "enabled.h"
#if _MSC_VER
#include <stdlib.h>
#endif

/**
* @brief ChaCha static constant
Expand Down Expand Up @@ -58,11 +55,7 @@ constexpr size_t CHACHA_NONCE_SIZE = 12;
* @return shifted value
*/
constexpr uint32_t rotl_u32(uint32_t value, int shift) {
#if _MSC_VER
return _rotl(value, shift);
#else
return (value << shift) | (value >> ((-shift) & 31));
#endif
}

/**
Expand Down

0 comments on commit 1d0c5eb

Please sign in to comment.