Replace guards with pragma once

This commit is contained in:
Krzosa Karol
2023-12-31 10:30:34 +01:00
parent 1569f94374
commit 4ef1cb7250
14 changed files with 25 additions and 56 deletions

18
hash.h
View File

@@ -1,5 +1,4 @@
#ifndef HASH_HEADER
#define HASH_HEADER
#pragma once
#include <stdint.h>
#ifndef HASH_API_FUNCTION
@@ -19,15 +18,14 @@ struct RandomSeed {
};
//@begin gen_api_funcs
HASH_API_FUNCTION uint64_t HashBytes(void *data, uint64_t size);
HASH_API_FUNCTION RandomSeed MakeRandomSeed(uint64_t value);
HASH_API_FUNCTION uint64_t GetRandomU64(RandomSeed *state);
HASH_API_FUNCTION int GetRandomRangeI(RandomSeed *seed, int first, int last_included);
HASH_API_FUNCTION double GetRandomNormal(RandomSeed *series);
HASH_API_FUNCTION double GetRandomNormalRange(RandomSeed *seed, double min, double max);
HASH_API_FUNCTION uint64_t HashMix(uint64_t x, uint64_t y);
HASH_API_FUNCTION uint64_t HashBytes(void *data, uint64_t size);
HASH_API_FUNCTION RandomSeed MakeRandomSeed(uint64_t value);
HASH_API_FUNCTION uint64_t GetRandomU64(RandomSeed *state);
HASH_API_FUNCTION int GetRandomRangeI(RandomSeed *seed, int first, int last_included);
HASH_API_FUNCTION double GetRandomNormal(RandomSeed *series);
HASH_API_FUNCTION double GetRandomNormalRange(RandomSeed *seed, double min, double max);
HASH_API_FUNCTION uint64_t HashMix(uint64_t x, uint64_t y);
//@end gen_api_funcs
#define WRAP_AROUND_POWER_OF_2(x, pow2) (((x) & ((pow2)-1llu)))
static inline float GetRandomNormalF(RandomSeed *series) { return (float)GetRandomNormal(series); }
#endif