diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-09 17:19:41 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-12 09:19:02 +0000 |
commit | 37f8f566d53a3e2603467aa0bbe1e29581ddd561 (patch) | |
tree | ed49d6b26816a47b37cf3a691909cdf5178d2b6f /toxcore/list.h | |
parent | 0b7e29e0197f18ea38a62f8f89a1fe60edb462a0 (diff) |
Fix style in some header files.
* Enums must by typedef'd.
* Comments at end of `#define` must be `//` comments.
* Typedef structs must not be anonymous.
* `;` at the end of a `#define` is invalid.
* Callback typedefs must list their parameter names.
* No nested structs.
* No inline use of function pointer types. Only typedef'd callback types
are allowed.
* Enum types are spelled in Camelsnake_Case.
* The argument to `#error` must be a string literal.
Diffstat (limited to 'toxcore/list.h')
-rw-r--r-- | toxcore/list.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/toxcore/list.h b/toxcore/list.h index 8c6ddbf3..628b46a0 100644 --- a/toxcore/list.h +++ b/toxcore/list.h | |||
@@ -28,12 +28,12 @@ | |||
28 | 28 | ||
29 | #include <stdint.h> | 29 | #include <stdint.h> |
30 | 30 | ||
31 | typedef struct { | 31 | typedef struct BS_List { |
32 | uint32_t n; //number of elements | 32 | uint32_t n; // number of elements |
33 | uint32_t capacity; //number of elements memory is allocated for | 33 | uint32_t capacity; // number of elements memory is allocated for |
34 | uint32_t element_size; //size of the elements | 34 | uint32_t element_size; // size of the elements |
35 | uint8_t *data; //array of elements | 35 | uint8_t *data; // array of elements |
36 | int *ids; //array of element ids | 36 | int *ids; // array of element ids |
37 | } BS_List; | 37 | } BS_List; |
38 | 38 | ||
39 | /* Initialize a list, element_size is the size of the elements in the list and | 39 | /* Initialize a list, element_size is the size of the elements in the list and |