manage nonces in crypto.h
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
if (!(cond)) { \
|
||||
std::cerr << "ASSERTION FAILED at " << __FILE__ << ":" << __LINE__ \
|
||||
<< "\n" \
|
||||
<< #cond << std::endl; \
|
||||
<< #cond << '\n'; \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
using u8 = unsigned char;
|
||||
using u8 = uint8_t;
|
||||
using i16 = int16_t;
|
||||
using u16 = uint16_t;
|
||||
using i32 = int32_t;
|
||||
@@ -26,11 +26,6 @@ using f32 = float;
|
||||
static_assert(sizeof(double) * 8 == 64);
|
||||
using f64 = double;
|
||||
|
||||
inline std::string path_to_filename(const std::string &path) {
|
||||
u64 pos = path.find_last_of("/\\");
|
||||
return (pos == std::string::npos) ? path : path.substr(pos + 1);
|
||||
}
|
||||
|
||||
template <typename T> constexpr char *to_char_ptr(T *ptr) noexcept {
|
||||
return reinterpret_cast<char *>(ptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user