aboutsummaryrefslogtreecommitdiffstats
path: root/taglib/flac
diff options
context:
space:
mode:
authorTsuda Kageyu <tsuda.kageyu@gmail.com>2017-01-22 00:43:32 +0900
committerTsuda Kageyu <tsuda.kageyu@gmail.com>2017-01-22 00:43:32 +0900
commitfc38a0e40131f649fba37e218da2d9598ef3a633 (patch)
tree21b6caf07add5cbe12e30655cb3e7b3c700175f6 /taglib/flac
parent5fc5a2e81a874c0d771e31c450d40ca4a329dc9c (diff)
Remove some redundant code.
TagUnion::access() does the same thing as FLAC::File::ID3v2Tag().
Diffstat (limited to 'taglib/flac')
-rw-r--r--taglib/flac/flacfile.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp
index 34599e89..b6b72960 100644
--- a/taglib/flac/flacfile.cpp
+++ b/taglib/flac/flacfile.cpp
@@ -297,11 +297,7 @@ bool FLAC::File::save()
ID3v2::Tag *FLAC::File::ID3v2Tag(bool create)
{
- if(!create || d->tag[FlacID3v2Index])
- return static_cast<ID3v2::Tag *>(d->tag[FlacID3v2Index]);
-
- d->tag.set(FlacID3v2Index, new ID3v2::Tag());
- return static_cast<ID3v2::Tag *>(d->tag[FlacID3v2Index]);
+ return d->tag.access<ID3v2::Tag>(FlacID3v2Index, create);
}
ID3v1::Tag *FLAC::File::ID3v1Tag(bool create)