mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Mark constants in List constexpr so they don't actually take up space in created objects
This resizes List from 24 bytes to 16 bytes.
This commit is contained in:
parent
2964093e5d
commit
471cf8587b
1 changed files with 2 additions and 2 deletions
|
@ -33,8 +33,8 @@ template<typename T>
|
|||
class List {
|
||||
public:
|
||||
|
||||
const int DEFAULT_LIST_SIZE = 10;
|
||||
const int LIST_GROWTH_FACTOR = 2;
|
||||
constexpr static int DEFAULT_LIST_SIZE = 10;
|
||||
constexpr static int LIST_GROWTH_FACTOR = 2;
|
||||
|
||||
~List() { free(entries); }
|
||||
explicit List(int size = 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue