mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Switch the return type of File::save() from void to bool to provide a little
bit of feedback on whether or not the safe operation worked. CCMAIL:83882@bugs.kde.org git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@323165 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -176,8 +176,13 @@ const Ogg::PageHeader *Ogg::File::lastPageHeader()
|
||||
return d->lastPageHeader->isValid() ? d->lastPageHeader : 0;
|
||||
}
|
||||
|
||||
void Ogg::File::save()
|
||||
bool Ogg::File::save()
|
||||
{
|
||||
if(readOnly()) {
|
||||
debug("Ogg::File::save() - Cannot save to a read only file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
List<int> pageGroup;
|
||||
|
||||
for(List<int>::ConstIterator it = d->dirtyPages.begin(); it != d->dirtyPages.end(); ++it) {
|
||||
@ -191,6 +196,8 @@ void Ogg::File::save()
|
||||
writePageGroup(pageGroup);
|
||||
d->dirtyPages.clear();
|
||||
d->dirtyPackets.clear();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user