diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-11-17 05:24:04 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-11-17 05:24:04 +0100 |
commit | d5a727a062e4d727491f4e7f047269d60a93a8cf (patch) | |
tree | 565aec155ab056f1bef8ddc7dc78d52e65aa76b7 /kit/lower_bound.h | |
parent | 4ba961dcbf60f7c12f53f46baa261757e15d5931 (diff) | |
download | saw-d5a727a062e4d727491f4e7f047269d60a93a8cf.zip |
Remove lots of dependencies
Diffstat (limited to 'kit/lower_bound.h')
-rw-r--r-- | kit/lower_bound.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/kit/lower_bound.h b/kit/lower_bound.h deleted file mode 100644 index eb437ed..0000000 --- a/kit/lower_bound.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef KIT_LOWER_BOUND_H -#define KIT_LOWER_BOUND_H - -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define KIT_LOWER_BOUND_INL(return_val, size, ...) \ - do { \ - i64 position_ = 0; \ - i64 count_ = (size); \ - while (count_ > 0) { \ - i64 delta_ = count_ / 2; \ - i64 index_ = position_ + delta_; \ - if (__VA_ARGS__) { \ - position_ += delta_ + 1; \ - count_ -= delta_ + 1; \ - } else \ - count_ = delta_; \ - } \ - (return_val) = position_; \ - } while (0) - -#define KIT_LOWER_BOUND(return_val, array, value, op) \ - KIT_LOWER_BOUND_INL(return_val, (array).size, \ - (op) ((array).values[index_], (value))) - -#define KIT_LOWER_BOUND_REF(return_val, array, value, op) \ - KIT_LOWER_BOUND_INL(return_val, (array).size, \ - (op) ((array).values + index_, (value))) - -#ifdef __cplusplus -} -#endif - -#define LOWER_BOUND_INL KIT_LOWER_BOUND_INL -#define LOWER_BOUND KIT_LOWER_BOUND -#define LOWER_BOUND_REF KIT_LOWER_BOUND_REF - -#endif |