mirror of https://github.com/xzeldon/htop.git
Optimize Vector_size on non-debug builds
This commit is contained in:
parent
03f17688ad
commit
f37a050d3d
8
Vector.c
8
Vector.c
|
@ -284,11 +284,19 @@ inline Object* Vector_get(Vector* this, int idx) {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
|
||||||
inline int Vector_size(Vector* this) {
|
inline int Vector_size(Vector* this) {
|
||||||
assert(Vector_isConsistent(this));
|
assert(Vector_isConsistent(this));
|
||||||
return this->items;
|
return this->items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define Vector_size(v_) ((v_)->items)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
static void Vector_merge(Vector* this, Vector* v2) {
|
static void Vector_merge(Vector* this, Vector* v2) {
|
||||||
|
|
Loading…
Reference in New Issue