a9dae134d0
Inserting into a vector can sometimes cause the entire vector to reallocate itself. The insert() function returns a pointer to the caller, so this reallocation could invalidate the returned pointer. This is not what we want. Instead, store pointers to the data in the vector. C++ provides a default copy constructor that can be used to allocate a new item before inserting. By doing it this way callers won't have to allocate memory themselves. In addition, I will no longer need to keep a valid bit since we can simply check for a NULL entry in the database. Signed-off-by: Anna Schumaker <anna@ocarinaproject.net> |
||
---|---|---|
gui | ||
include | ||
lib | ||
share | ||
tests | ||
.gitattributes | ||
.gitignore | ||
DESIGN | ||
LICENSE | ||
PKGBUILD | ||
README | ||
Sconstruct | ||
TODO |
README
Build: $ scons Clean: $ scons -c Install: $ sudo scons install Uninstall: $ sudo scons -c install Build tests: $ scons tests Clean tests: $ scons -c tests