gerstrong/Commander-Genius — pull request #205 by z33ky (2014-09-19 20:10:52+00:00)
Title: Remove temporary C-string buffers in CMusic

All instances of `ifstream::getline(charbuf, size, delim), str = charbuf` are replaced by `getline(ifstream, string, delim)`.

Then `std::stoi` (introduced in C++11) is used in favor of `atoi`.

The logic in `CMusic::LoadfromMusicTable()` demanded more changes to work without a char-buffer.

Finally, `ifstream::close()` was dropped. `~ifstream()` takes care of that for us.

Also, I think the `bool busy` should be atomic (or otherwise synchronized)? Looking at `CMusic::stop` it seems like the functions are intended to be used in a concurrent manner.