-
Notifications
You must be signed in to change notification settings - Fork 219
Dev generic list #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev generic list #454
Conversation
generic linked list
Tests are passing
Adding documentation
Fixed memory leak in test_head_list
Updating in line comments.
Spaces not tabs
Fixing indent
Updating file header to reflect proper attribution
Added test where data is a struct
Simplifying head and tail list. Adding delete_node() to list API.
Fixing bug on gcc
Adding test_list to ctest
From the list of file changes I assume that this commit is just adding the generic linked list files into the project without actually using them for any of the linked lists in the actual EPANET code. Do I have that right or have you also modified types.h, project.c, rules.c, etc. to use them for the Demand, Adjacency, and Rule Clause lists? Also, if we are placing list.c and list.h into the util directory shouldn't we do the same for the hashing and memory pool utilities for consistency. Actually my preference is to place the linked list files into the src directory so that all of the files needed to build just the EPANET engine are kept together in one place. |
@LRossman you are correct I haven't modified the linked lists in EPANET yet. However, you can see from the unit tests I wrote precisely how it will work for a list of structs like we use in EPANET. Funny, I guess I'm in favor of moving |
See Issue #452
Straight forward to use. Tests with no memory leaks.