aboutsummaryrefslogtreecommitdiffstats
path: root/include/utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils.hpp')
-rw-r--r--include/utils.hpp8
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_