Use static const (#76)

This commit is contained in:
Bailey Thompson
2020-08-10 00:36:12 -04:00
committed by GitHub
parent c05d97e2c9
commit 94e5530996
2 changed files with 7 additions and 7 deletions

View File

@@ -24,10 +24,10 @@
#include <errno.h>
#include "include/array.h"
const size_t book_keeping_size = sizeof(size_t);
const size_t arr_size_offset = 0;
const size_t data_size_offset = sizeof(size_t);
const size_t data_ptr_offset = 2 * sizeof(size_t);
static const size_t book_keeping_size = sizeof(size_t);
static const size_t arr_size_offset = 0;
static const size_t data_size_offset = sizeof(size_t);
static const size_t data_ptr_offset = 2 * sizeof(size_t);
/**
* Initializes an array. If the multiplication of the element count and the

View File

@@ -31,9 +31,9 @@ struct internal_forward_list {
char *tail;
};
const size_t ptr_size = sizeof(char *);
const size_t node_next_ptr_offset = 0;
const size_t node_data_ptr_offset = sizeof(char *);
static const size_t ptr_size = sizeof(char *);
static const size_t node_next_ptr_offset = 0;
static const size_t node_data_ptr_offset = sizeof(char *);
/**
* Initializes a singly-linked list.