Taybin Rutkin wrote:
> I prefer the unix-y open_read(). I don't think method names should
> ever start with a capital, unless it's the ctor or dtor.
I'm actually tending towards openRead().
> I noticed that the constructor SndFile::SndFile (const char *path,
> int mode, SF_INFO *sfinfo)
> isn't declared in the class. Also, since this constructor can fail
> if sf_open() fails up, it should throw an exception. Maybe
> containing the results of sf_strerror().
>
> Something like
>
> SndFile::SndFile (const char *path, int mode, SF_INFO *sfinfo)
> {
> psf = sf_open (path, mode, sfinfo) ;
> if (!psf) {
> throw sf_error(psf);
> }
> }
Good tip, thanks.
Erik
-- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?" -- Tom CargillReceived on Wed Jul 26 20:15:08 2006
This archive was generated by hypermail 2.1.8 : Wed Jul 26 2006 - 20:15:09 EEST