From b4d24e8f2cb4838acc0b827f007e7faa609039ba Mon Sep 17 00:00:00 2001 From: ladevieq Date: Wed, 24 Dec 2025 15:35:21 +0100 Subject: Use build.bat for building Everything is included in main.cpp Do not rely on vcpkg anymore --- include/utils.hpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'include/utils.hpp') diff --git a/include/utils.hpp b/include/utils.hpp index 83a867f..e49b218 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -1,21 +1,15 @@ #pragma once #include -#include #include -#include std::vector read_file(const char* 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; + return static_cast(deg * PI / 180.f); } inline float randd() { @@ -45,9 +39,11 @@ void log_last_error(); class watcher { public: - static bool watch_file(std::filesystem::path&& filepath, std::function callback); + typedef void(*func)(void); + + static bool watch_file(const char* filepath, func callback); - static bool watch_dir(std::filesystem::path&& dir_path); + static bool watch_dir(const char* dir_path); static void pull_changes(); @@ -59,7 +55,7 @@ private: DWORD buffer[512]; }; - inline static std::unordered_map> callbacks; - inline static std::unordered_map watched_dirs; + inline static std::unordered_map callbacks; + inline static std::unordered_map watched_dirs; }; #endif -- cgit v1.3