]> granicus.if.org Git - taglib/commitdiff
MP4: Hide an internal function from the public header.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 31 Jul 2015 14:59:22 +0000 (23:59 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 31 Jul 2015 14:59:22 +0000 (23:59 +0900)
taglib/mp4/mp4file.cpp
taglib/mp4/mp4file.h

index 84055c11b05d7246b3ae2432d445ca126f46c843..1fc1524fd1f79ebe50bc4beb6af97d71f9ccca6a 100644 (file)
 
 using namespace TagLib;
 
+namespace
+{
+  bool checkValid(const MP4::AtomList &list)
+  {
+    for(MP4::AtomList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+
+      if((*it)->length == 0)
+        return false;
+
+      if(!checkValid((*it)->children))
+        return false;
+    }
+
+    return true;
+  }
+}
+
 class MP4::File::FilePrivate
 {
 public:
@@ -47,8 +64,8 @@ public:
     delete properties;
   }
 
-  MP4::Tag *tag;
-  MP4::Atoms *atoms;
+  MP4::Tag        *tag;
+  MP4::Atoms      *atoms;
   MP4::Properties *properties;
 };
 
@@ -100,18 +117,6 @@ MP4::File::audioProperties() const
   return d->properties;
 }
 
-bool
-MP4::File::checkValid(const MP4::AtomList &list)
-{
-  for(uint i = 0; i < list.size(); i++) {
-    if(list[i]->length == 0)
-      return false;
-    if(!checkValid(list[i]->children))
-      return false;
-  }
-  return true;
-}
-
 void
 MP4::File::read(bool readProperties)
 {
@@ -119,7 +124,7 @@ MP4::File::read(bool readProperties)
     return;
 
   d->atoms = new Atoms(this);
-  if (!checkValid(d->atoms->atoms)) {
+  if(!checkValid(d->atoms->atoms)) {
     setValid(false);
     return;
   }
index 0d615216d08799cfd7627096fd17a541959942ee..28880f8444b3325b69ca0f35c4a22f4274bc7149 100644 (file)
@@ -115,9 +115,7 @@ namespace TagLib {
       bool save();
 
     private:
-
       void read(bool readProperties);
-      bool checkValid(const MP4::AtomList &list);
 
       class FilePrivate;
       FilePrivate *d;