ocarina/tests
Anna Schumaker a9dae134d0 database: Store pointers in the database
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>
2014-04-09 21:10:08 -04:00
..
audio tests: Update tests for recent deck change 2014-04-06 19:57:02 -04:00
deck tests: Update tests for recent deck change 2014-04-06 19:57:02 -04:00
gui gui: Change default page 2014-04-06 19:57:00 -04:00
library file: Strip leading whitespace when reading strings 2014-04-06 19:56:58 -04:00
Music tagdb: Add most functions 2014-04-09 21:10:08 -04:00
playlist errors: Rename error codes 2014-04-06 19:56:57 -04:00
playqueue playqueue test fixes 2014-04-06 19:57:02 -04:00
src database: Store pointers in the database 2014-04-09 21:10:08 -04:00
_functions Rename config -> Sconstruct 2014-04-09 21:09:49 -04:00
database database: don't iterate if there are no entries 2014-04-06 19:57:06 -04:00
db_entry database: Store pointers in the database 2014-04-09 21:10:08 -04:00
file Small file test cleanup 2014-04-06 19:57:05 -04:00
filter filter: Update design and rewrite the unit test 2014-04-06 19:57:06 -04:00
idle idle: Update design and unit test 2014-04-06 19:57:06 -04:00
index index: Update the index design 2014-04-06 19:57:05 -04:00
Sconscript tags: Begin creating the tag database 2014-04-09 21:10:07 -04:00
tag_db tagdb: Add most functions 2014-04-09 21:10:08 -04:00
version tests: Change executable names 2014-04-06 19:57:05 -04:00