diff --git a/taglib/mpeg/id3v2/id3v2frame.cpp b/taglib/mpeg/id3v2/id3v2frame.cpp index ae9e6ef3..d60ce4a7 100644 --- a/taglib/mpeg/id3v2/id3v2frame.cpp +++ b/taglib/mpeg/id3v2/id3v2frame.cpp @@ -57,17 +57,20 @@ public: Frame::Header *header; }; -bool isValidFrameID(const ByteVector &frameID) +namespace { - if(frameID.size() != 4) { - return false; - } - for(ByteVector::ConstIterator it = frameID.begin(); it != frameID.end(); it++) { - if( (*it < 'A' || *it > 'Z') && (*it < '1' || *it > '9') ) { + bool isValidFrameID(const ByteVector &frameID) + { + if(frameID.size() != 4) return false; + + for(ByteVector::ConstIterator it = frameID.begin(); it != frameID.end(); it++) { + if( (*it < 'A' || *it > 'Z') && (*it < '1' || *it > '9') ) { + return false; + } } + return true; } - return true; } ////////////////////////////////////////////////////////////////////////////////