fix windows vs unix path insanity

This commit is contained in:
2025-09-07 14:50:11 -05:00
parent 0e210b4fbb
commit 17e6ac5f83
2 changed files with 2 additions and 5 deletions

View File

@@ -1,8 +1,5 @@
srcs=src/*
working_dir=$pwd
echo [ > compile_commands.json
find src -iname "*.cpp" -exec sh -c 'echo { \"directory\": \"$(pwd)\", \"command\": \"cl {} -I inc -Od -std:c++20 -Fo\", \"file\": \"{}\" }, >> compile_commands.json' \;
find src -iname "*.cpp" -exec sh -c 'echo { \"directory\": \"$(cygpath -m $(pwd))\", \"command\": \"cl "$(cygpath -m {})" -I inc -Od -std:c++20 -Fo\", \"file\": \"$(cygpath -m {})\" }, >> compile_commands.json' \;
echo ] >> compile_commands.json

View File

@@ -14,5 +14,5 @@ inline void xorshift64(uint64_t &state) {
// returns a random value between -1 and 1. modifies seed
inline float norm_rand(uint64_t &state) {
xorshift64(state);
return (state - half_max) / half_max;
return static_cast<float>(state - half_max) / static_cast<float>(half_max);
}