... And in some places where a library uses signed types, assert that
the reported number is not negative.
What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
...They may never have been large enough to matter, but some seek offsets into
files were written as 64 bits but read back as only 32. It ought to be
consistent.
I refactored the code into AudacityApp with a new timer. This is provisional pending discussion - if it is decided that it should go somewhere else I will move it.
Make DirManager::MoveToNewProjectDirectory(), DirManager::CopyToNewProjectDirectory(), and several BuildFromXML() methods check the result of AssignFile() and do something appropriate about it on failure, rather than ignoring it. Also made AssignFile() check whether the assigned name is well-formed, so it doesn't always return TRUE when disckcheck is FALSE.
Briefer and more correct checks for uninitialized wxFileName objects.
Several "//ANSWER-ME" comments about file ops and commented-out cruft to probably remove.
Clarify some logic and readability.
better handling of error conditions in all BuildFromXML methods, per comment:
// BuildFromXML methods should always return a BlockFile, not NULL,
// even if the result is flawed (e.g., refers to nonexistent file),
// as testing will be done in DirManager::ProjectFSCK().
better handling of error conditions in PCMAliasBlockFile::BuildFromXML so that DirManager::ProjectFSCK can report cases of missing PCMAliasBlockFile files on opening projects where missing files were not corrected
code cleanup
naming improvements for clarity (e.g., aliasedFileName instead of aliasedFile for an instance of wxFileName -- it's not an instance of AliasedFile)
parens, not square brackets, for parenthetic phrases