diff --git a/dev/CMakeLists.txt b/dev/CMakeLists.txt index 4895ce0..61704c9 100644 --- a/dev/CMakeLists.txt +++ b/dev/CMakeLists.txt @@ -45,7 +45,8 @@ else() endif() add_custom_target(CopyHeader - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/olcPixelGameEngine3.h ${REPO_ROOT_DIR}/olcPixelGameEngine3.h + BYPRODUCTS ${REPO_ROOT_DIR}/olcPixelGameEngine3.h + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/olcPixelGameEngine3.h ${REPO_ROOT_DIR}/olcPixelGameEngine3.h DEPENDS olcPixelGameEngine3.h ) diff --git a/dev/src/vector4d.h b/dev/src/vector4d.h index 3661b50..2b477b7 100644 --- a/dev/src/vector4d.h +++ b/dev/src/vector4d.h @@ -310,6 +310,13 @@ namespace olc return lhs; } + template + inline constexpr auto operator -= (v_4d& lhs, const v_4d& rhs) + { + lhs = lhs - rhs; + return lhs; + } + // Greater/Less-Than Operator overloads - mathematically useless, but handy for "sorted" container storage template inline constexpr bool operator < (const v_4d& lhs, const v_4d& rhs) diff --git a/olcPixelGameEngine3.h b/olcPixelGameEngine3.h index 2b919d7..c610efb 100644 --- a/olcPixelGameEngine3.h +++ b/olcPixelGameEngine3.h @@ -1309,6 +1309,13 @@ namespace olc return lhs; } + template + inline constexpr auto operator -= (v_4d& lhs, const v_4d& rhs) + { + lhs = lhs - rhs; + return lhs; + } + // Greater/Less-Than Operator overloads - mathematically useless, but handy for "sorted" container storage template inline constexpr bool operator < (const v_4d& lhs, const v_4d& rhs)