diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-07-11 00:50:27 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-07-11 00:50:27 +0200 |
| commit | 23e6a58d59b7a11cb8bdb7aa61d3c534c02027e7 (patch) | |
| tree | aa62fe9d75f4b82a0caee70d3bf14fa1e0b617b2 /include/utils.hpp | |
| parent | d676e9a2fb533494d1558483e8266605b1d5b632 (diff) | |
Refactor includes & improve compile time
Add platform defined to CMakeLists.txt
Diffstat (limited to 'include/utils.hpp')
| -rw-r--r-- | include/utils.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/utils.hpp b/include/utils.hpp index 6e39098..52f3297 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -1,8 +1,8 @@ #ifndef __UTILS_HPP_ #define __UTILS_HPP_ -#include <thread> #include <vector> +#include <functional> std::vector<uint8_t> read_file(const char* path); std::vector<uint8_t> read_file(std::string& path); @@ -10,6 +10,10 @@ std::vector<uint8_t> read_file(std::string& path); #define PI 3.14159265359 #define EPSILON 0.000001 +namespace std::filesystem { + class path; +} + inline float deg_to_rad(float deg) { return deg * PI / 180.f; } @@ -32,4 +36,6 @@ inline float clamp(float x, float min, float max) { return x; } +void watch_file(std::filesystem::path&& filepath, std::function<void()>&& callback); + #endif // !__UTILS_HPP_ |
