Remove unused defines, done TODO
This commit is contained in:
parent
8e29343f3e
commit
ff59b301cc
18
src/vector.h
18
src/vector.h
@ -28,24 +28,6 @@
|
||||
__LINE__, \
|
||||
__VA_ARGS__); \
|
||||
}
|
||||
#define foreach(item, vector) \
|
||||
for (int keep = 1, \
|
||||
count = 0, \
|
||||
size = sizeof(vector->elements) / sizeof vector->elements; \
|
||||
keep && count != size; \
|
||||
keep = !keep, count++) \
|
||||
for (item = \
|
||||
(void *)((char *)(vector->elements) + (count * sizeof(void *))); \
|
||||
keep; \
|
||||
keep = !keep)
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
// `sizeof()' does NOT work with dynamically allocated memory. Vector capacity
|
||||
// must be tracked manually
|
||||
|
||||
/* Destructor typedef */
|
||||
typedef void (*Destructor)(void *element);
|
||||
|
Loading…
Reference in New Issue
Block a user