summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-07-27 11:55:57 +0200
committeraura <nw@moneybot.cc>2026-07-27 11:55:57 +0200
commit372f23024163e0fab57a847ddda41f06857efd7e (patch)
treeca57dd38a583387a7bbcc970b7d359731df0f4bf /src/util
parent452e3619450ab9e7d22886445f61cc90272e4d60 (diff)
undo/redo props - WIP
Diffstat (limited to 'src/util')
-rw-r--r--src/util/allocator.h1
-rw-r--r--src/util/profiler.h2
-rw-r--r--src/util/vector.h9
3 files changed, 5 insertions, 7 deletions
diff --git a/src/util/allocator.h b/src/util/allocator.h
index d97952d..3cee282 100644
--- a/src/util/allocator.h
+++ b/src/util/allocator.h
@@ -2,7 +2,6 @@
#include <stdlib.h>
#include <string.h>
-#include <utility>
#include "callback.h"
template <typename T>
diff --git a/src/util/profiler.h b/src/util/profiler.h
index 05e4b0c..c7a0fd1 100644
--- a/src/util/profiler.h
+++ b/src/util/profiler.h
@@ -142,6 +142,7 @@ extern void __profiler_intern_draw_overlay( struct GL_FONT* font );
#define profiler_init() __profiler_intern_init()
#define profiler_draw_tree( font ) __profiler_intern_draw_overlay( font )
#define profiler_trace() __profiler_intern_trace()
+#define trace( ... ) do { dlog( __VA_ARGS__ ); profiler_trace(); } while(0)
#else
#define PROFILE( x )
@@ -149,4 +150,5 @@ extern void __profiler_intern_draw_overlay( struct GL_FONT* font );
#define profiler_trace()
#define profiler_init()
#define profiler_draw_tree( x )
+#define trace( ... )
#endif
diff --git a/src/util/vector.h b/src/util/vector.h
index eb386ab..294b627 100644
--- a/src/util/vector.h
+++ b/src/util/vector.h
@@ -13,10 +13,9 @@ struct VEC2 {
VEC2() { x = y = 0.0f; }
VEC2( F32 X, F32 Y ) { x = X; y = Y; }
- VEC2( const VEC2& v ) { x = v.x; y = v.y; }
+ VEC2( const VEC2& v ) = default;
bool operator==( const VEC2& v ) const { return ( x == v.x && y == v.y ); }
- VEC2& operator=( const VEC2& v ) { x = v.x; y = v.y; return *this; }
F32& operator[]( I32 i ) { return ( (F32*)this )[i]; }
F32 operator[]( I32 i ) const { return ( (const F32*)this )[i]; }
@@ -48,13 +47,12 @@ struct VEC3 {
VEC3() { x = y = z = 0.0f; }
VEC3( F32 X, F32 Y, F32 Z ) { x = X; y = Y; z = Z; }
- VEC3( const VEC3& v ) { x = v.x; y = v.y; z = v.z; }
+ VEC3( const VEC3& v ) = default;
VEC3( const VEC2& v ) { x = v.x; y = v.y; z = 0.f; }
bool operator==( const VEC3& v ) const { return ( x == v.x && y == v.y && z == v.z ); }
bool operator!=( const VEC3& v ) const { return !( x == v.x && y == v.y && z == v.z ); }
- VEC3& operator=( const VEC3& v ) { x = v.x; y = v.y; z = v.z; return *this; }
F32& operator[]( I32 i ) { return ( (F32*)this )[i]; }
F32 operator[]( I32 i ) const { return ( (F32*)this )[i]; }
@@ -84,7 +82,7 @@ struct VEC4 {
VEC4() { x = y = z = w = 0; }
VEC4( F32 X, F32 Y, F32 Z, F32 W ) { x = X; y = Y; z = Z; w = W; }
- VEC4( const VEC4& v ) { x = v.x; y = v.y; z = v.z; w = v.w; }
+ VEC4( const VEC4& v ) = default;
VEC4( const VEC3& v ) { x = v.x; y = v.y; z = v.z; w = 1.f; }
VEC4( const VEC2& v ) { x = v.x; y = v.y; z = 0.f; w = 1.f; }
@@ -93,7 +91,6 @@ struct VEC4 {
VEC4( F32* v ) { x = v[0]; y = v[1]; z = v[2]; w = v[3]; }
- VEC4 operator=( const VEC4& v ) { x = v.x; y = v.y; z = v.z; w = v.w; return *this; }
F32& operator[]( const int i ) { return *(&x + i); }
F32 operator[]( const int i ) const { return *(&x + i); }