1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-26 16:15:53 +01:00

Rewrite comments about exception safety guarantees with Doxygen...

... Defining a new macro, which generates a special paragraph with links to a
new page describing the principles.
This commit is contained in:
Paul Licameli
2020-08-22 15:33:03 -04:00
parent 0e10a27172
commit 372393f49e
12 changed files with 253 additions and 116 deletions

View File

@@ -1073,8 +1073,8 @@ void TrackList::UpdatePendingTracks()
}
}
/*! @excsafety{No-fail} */
void TrackList::ClearPendingTracks( ListOfTracks *pAdded )
// NOFAIL-GUARANTEE
{
for (const auto &pTrack: mPendingUpdates)
pTrack->SetOwner( {}, {} );
@@ -1115,6 +1115,7 @@ void TrackList::ClearPendingTracks( ListOfTracks *pAdded )
}
}
/*! @excsafety{Strong} */
bool TrackList::ApplyPendingTracks()
{
bool result = false;
@@ -1128,8 +1129,8 @@ bool TrackList::ApplyPendingTracks()
updates.swap( mPendingUpdates );
}
// Remaining steps must be NOFAIL-GUARANTEE so that this function
// gives STRONG-GUARANTEE
// Remaining steps must be No-fail-guarantee so that this function
// gives Strong-guarantee
std::vector< std::shared_ptr<Track> > reinstated;