From 23e6a58d59b7a11cb8bdb7aa61d3c534c02027e7 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Mon, 11 Jul 2022 00:50:27 +0200 Subject: Refactor includes & improve compile time Add platform defined to CMakeLists.txt --- include/utils.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/utils.hpp') 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 #include +#include std::vector read_file(const char* path); std::vector read_file(std::string& path); @@ -10,6 +10,10 @@ std::vector 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&& callback); + #endif // !__UTILS_HPP_ -- cgit v1.3