summaryrefslogtreecommitdiffstats
path: root/Vector.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-02-05 11:01:35 +0100
committerHisham Muhammad <hisham@gobolinux.org>2018-02-05 11:01:35 +0100
commitf37a050d3d0c6928b09d9b19e1283a695c52ccc7 (patch)
tree5eb816b52f4de1f6ac4e5e7c2b55dc056bb639a7 /Vector.h
parent03f17688ada3800bdd344ec4397f81289977b153 (diff)
Optimize Vector_size on non-debug builds
Diffstat (limited to 'Vector.h')
-rw-r--r--Vector.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Vector.h b/Vector.h
index 9b284778..85939bf1 100644
--- a/Vector.h
+++ b/Vector.h
@@ -70,8 +70,16 @@ extern Object* Vector_get(Vector* this, int idx);
#endif
+#ifdef DEBUG
+
extern int Vector_size(Vector* this);
+#else
+
+#define Vector_size(v_) ((v_)->items)
+
+#endif
+
/*
*/

© 2014-2024 Faster IT GmbH | imprint | privacy policy