]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/metaindex.cc
don't leak on error in listparser creation
[apt.git] / apt-pkg / metaindex.cc
index 5c095a2ad2a6d2c820cbe7d9f50ac4b6dbaef413..6e5792b78f3d1b791ed4c0e8863444e4848f83cf 100644 (file)
@@ -3,6 +3,8 @@
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/metaindex.h>
 
+#include <apt-pkg/debmetaindex.h>
+
 #include <string>
 #include <vector>
                                                                        /*}}}*/
@@ -100,3 +102,20 @@ void metaIndex::swapLoad(metaIndex * const OldMetaIndex)           /*{{{*/
    std::swap(LoadedSuccessfully, OldMetaIndex->LoadedSuccessfully);
 }
                                                                        /*}}}*/
+
+bool metaIndex::IsArchitectureSupported(std::string const &arch) const /*{{{*/
+{
+   debReleaseIndex const * const deb = dynamic_cast<debReleaseIndex const *>(this);
+   if (deb != NULL)
+      return deb->IsArchitectureSupported(arch);
+   return true;
+}
+                                                                       /*}}}*/
+bool metaIndex::IsArchitectureAllSupportedFor(IndexTarget const &target) const/*{{{*/
+{
+   debReleaseIndex const * const deb = dynamic_cast<debReleaseIndex const *>(this);
+   if (deb != NULL)
+      return deb->IsArchitectureAllSupportedFor(target);
+   return true;
+}
+                                                                       /*}}}*/