A GTK+ / GStreamer based music player
Go to file
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
gui audio: Save and load current trackid 2014-04-06 19:57:06 -04:00
include database: Store pointers in the database 2014-04-09 21:10:08 -04:00
lib database: Store pointers in the database 2014-04-09 21:10:08 -04:00
share Update version 2014-04-09 21:10:07 -04:00
tests database: Store pointers in the database 2014-04-09 21:10:08 -04:00
.gitattributes Created a PKGBUILD 2011-11-11 08:12:40 -05:00
.gitignore gui: Move ocarina6.glade to share/ocarina/ 2014-04-06 19:57:04 -04:00
DESIGN database: Store pointers in the database 2014-04-09 21:10:08 -04:00
LICENSE Update the license 2014-04-06 19:57:06 -04:00
PKGBUILD Update PKGBUILD 2014-04-06 19:57:06 -04:00
README Add a `scons install` option 2014-04-09 20:37:46 -04:00
Sconstruct Update version 2014-04-09 21:10:07 -04:00
TODO Database: Improve on the insert() return value 2014-04-09 21:10:07 -04:00

README

Build:
	$ scons

Clean:
	$ scons -c

Install:
	$ sudo scons install

Uninstall:
	$ sudo scons -c install

Build tests:
	$ scons tests

Clean tests:
	$ scons -c tests