mirror of
https://github.com/raxracks/slibs.git
synced 2024-07-05 04:11:14 +12:00
remove obsolete code
This commit is contained in:
parent
8084ed69fb
commit
63edb9343b
20
slibs.h
20
slibs.h
|
@ -42,24 +42,6 @@
|
|||
|
||||
#define sl_stringify(x) #x
|
||||
|
||||
// Helper macros to count the number of arguments
|
||||
#define NARG_(...) NARG_##__VA_ARGS__
|
||||
#define NARG(...) NARG_(__VA_ARGS__, RSEQ_N())
|
||||
#define RSEQ_N() 5, 4, 3, 2, 1, 0
|
||||
#define ENUM_NAMES_N(values, n) ENUM_NAMES_##n values
|
||||
#define ENUM_NAMES_(values, n) ENUM_NAMES_N(values, n)
|
||||
#define ENUM_NAMES(...) ENUM_NAMES_(__VA_ARGS__, NARG(__VA_ARGS__))
|
||||
#define ENUM_NAMES_0
|
||||
#define ENUM_NAMES_1(x) #x
|
||||
#define ENUM_NAMES_2(x, ...) #x, ENUM_NAMES_1(__VA_ARGS__)
|
||||
#define ENUM_NAMES_3(x, ...) #x, ENUM_NAMES_2(__VA_ARGS__)
|
||||
#define ENUM_NAMES_4(x, ...) #x, ENUM_NAMES_3(__VA_ARGS__)
|
||||
#define ENUM_NAMES_5(x, ...) #x, ENUM_NAMES_4(__VA_ARGS__)
|
||||
|
||||
#define sl_named_enums(enum_name, ...) \
|
||||
enum enum_name { __VA_ARGS__, enum_name##_COUNT }; \
|
||||
const char *enum_name##EnumNames[] = {ENUM_NAMES(__VA_ARGS__)};
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Vector
|
||||
|
||||
|
@ -205,4 +187,4 @@ void sl_read_file(const char *filename, sl_string *buffer) {
|
|||
|
||||
#pragma endregion
|
||||
|
||||
#endif // SLIBS_H
|
||||
#endif // SLIBS_H
|
||||
|
|
Loading…
Reference in a new issue