diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-07-14 21:12:37 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-07-14 21:12:37 +0200 |
commit | 30740ca4131d1f574718262451b4410207dc8d4e (patch) | |
tree | fc88b16a216079397ad85b9c6b1a1c1c5712a814 /source/kit/move_back.h | |
parent | 5e3c99bb1cf1d03ea006300121265571f5008fd2 (diff) | |
download | saw-30740ca4131d1f574718262451b4410207dc8d4e.zip |
Reworking the build system
Diffstat (limited to 'source/kit/move_back.h')
-rw-r--r-- | source/kit/move_back.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/source/kit/move_back.h b/source/kit/move_back.h deleted file mode 100644 index 1885f5d..0000000 --- a/source/kit/move_back.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef KIT_MOVE_BACK_H -#define KIT_MOVE_BACK_H - -#include "types.h" - -#include <string.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define KIT_MOVE_BACK_INL(new_size, array, ...) \ - do { \ - i64 index_; \ - i64 end_ = (array).size; \ - u8 temp_[sizeof *(array).values]; \ - for (index_ = 0; index_ < end_;) { \ - if (__VA_ARGS__) { \ - end_--; \ - if (index_ != end_) { \ - memcpy(temp_, (array).values + end_, \ - sizeof *(array).values); \ - (array).values[end_] = (array).values[index_]; \ - memcpy((array).values + index_, temp_, \ - sizeof *(array).values); \ - } \ - } else \ - index_++; \ - } \ - (new_size) = end_; \ - } while (0) - -#define KIT_MOVE_BACK(new_size, array, value, cond) \ - KIT_MOVE_BACK_INL(new_size, array, \ - (cond) ((array).values[index_], (value))) - -#define KIT_MOVE_BACK_REF(new_size, array, value, cond) \ - KIT_MOVE_BACK_INL(new_size, array, \ - (cond) ((array).values + index_, (value))) - -#ifdef __cplusplus -} -#endif - -#define MOVE_BACK_INL KIT_MOVE_BACK_INL -#define MOVE_BACK KIT_MOVE_BACK -#define MOVE_BACK_REF KIT_MOVE_BACK_REF - -#endif |