diff options
author | Shauren <shauren.trinity@gmail.com> | 2019-06-06 16:48:21 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-06-08 17:09:24 +0200 |
commit | fc330fd8ff0115804d9c4b53a1f810c00dd63de9 (patch) | |
tree | cfa10998fed66779834bf0b7a9b8b799d33d91d4 /dep/CascLib/src/common/DynamicArray.h | |
parent | 82c7b6c5688495d90c4ee5995a4ff74039348296 (diff) |
Dep/CascLib: Update to ladislav-zezula/CascLib@a1197edf0b3bd4d52c3f39be7fa7b44bb0b98012
Diffstat (limited to 'dep/CascLib/src/common/DynamicArray.h')
-rw-r--r-- | dep/CascLib/src/common/DynamicArray.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/dep/CascLib/src/common/DynamicArray.h b/dep/CascLib/src/common/DynamicArray.h deleted file mode 100644 index 11cefacdcc4..00000000000 --- a/dep/CascLib/src/common/DynamicArray.h +++ /dev/null @@ -1,37 +0,0 @@ -/*****************************************************************************/ -/* DynamicArray.h Copyright (c) Ladislav Zezula 2015 */ -/*---------------------------------------------------------------------------*/ -/* Common array implementation */ -/*---------------------------------------------------------------------------*/ -/* Date Ver Who Comment */ -/* -------- ---- --- ------- */ -/* 30.10.15 1.00 Lad The first version of DynamicArray.h */ -/*****************************************************************************/ - -#ifndef __DYNAMIC_ARRAY_H__ -#define __DYNAMIC_ARRAY_H__ - -//----------------------------------------------------------------------------- -// Structures - -typedef struct _DYNAMIC_ARRAY -{ - char * ItemArray; // Pointer to items - size_t ItemCountMax; // Current number of items - size_t ItemCount; // Total size of the buffer - size_t ItemSize; // Size of the single item - -} DYNAMIC_ARRAY, *PDYNAMIC_ARRAY; - -//----------------------------------------------------------------------------- -// Functions for managing the array - -int Array_Create_(PDYNAMIC_ARRAY pArray, size_t ItemSize, size_t ItemCountMax); -void * Array_Insert(PDYNAMIC_ARRAY pArray, const void * NewItems, size_t NewItemCount); -void * Array_ItemAt(PDYNAMIC_ARRAY pArray, size_t ItemIndex); -size_t Array_IndexOf(PDYNAMIC_ARRAY pArray, const void * ArrayPtr); -void Array_Free(PDYNAMIC_ARRAY pArray); - -#define Array_Create(pArray, type, ItemCountMax) Array_Create_(pArray, sizeof(type), ItemCountMax) - -#endif // __DYNAMIC_ARRAY__ |