]> git.saurik.com Git - cydia.git/blobdiff - MobileCydia.mm
Remove unused std::hash_map implementation of -[SectionsController reloadData].
[cydia.git] / MobileCydia.mm
index 6bbab2792603f484a06b481650bf9410b7d76510..5f2a0ad78403c4ffe00e538c1e02d32afdc35e63 100644 (file)
@@ -118,8 +118,6 @@ extern "C" {
 #include <errno.h>
 #include <pcre.h>
 
-#include <ext/hash_map>
-
 #include "UICaboodle/BrowserView.h"
 
 #include "substrate.h"
@@ -1708,7 +1706,6 @@ typedef std::map< unsigned long, _H<Source> > SourceMap;
     CYString section_;
     _transient NSString *section$_;
     bool essential_;
-    bool required_;
     bool visible_;
     bool obsolete_;
 
@@ -2070,7 +2067,7 @@ struct PackageNameOrdering :
 }
 
 - (void) setVisible {
-    visible_ = required_ && [self unfiltered];
+    visible_ = [self unfiltered];
 }
 
 - (Package *) initWithVersion:(pkgCache::VerIterator)version withZone:(NSZone *)zone inPool:(apr_pool_t *)pool database:(Database *)database {
@@ -2118,8 +2115,6 @@ struct PackageNameOrdering :
                 data[i] |= 0x20;
         _end
 
-        required_ = true;
-
         _profile(Package$initWithVersion$Tags)
             pkgCache::TagIterator tag(iterator_.TagList());
             if (!tag.end()) {
@@ -2129,10 +2124,6 @@ struct PackageNameOrdering :
                     [tags_ addObject:[(NSString *)CYStringCreate(name) autorelease]];
                     if (role_ == nil && strncmp(name, "role::", 6) == 0 /*&& strcmp(name, "role::leaper") != 0*/)
                         role_ = (NSString *) CYStringCreate(name + 6);
-                    if (required_ && strncmp(name, "require::", 9) == 0 && (
-                        true
-                    ))
-                        required_ = false;
                     ++tag;
                 } while (!tag.end());
             }
@@ -6835,40 +6826,13 @@ freeing the view controllers on tab change */
     [sections_ removeAllObjects];
     [filtered_ removeAllObjects];
 
-#if 0
-    typedef __gnu_cxx::hash_map<NSString *, Section *, NSStringMapHash, NSStringMapEqual> SectionMap;
-    SectionMap sections;
-    sections.resize(64);
-#else
     NSMutableDictionary *sections([NSMutableDictionary dictionaryWithCapacity:32]);
-#endif
 
     _trace();
     for (Package *package in packages) {
         NSString *name([package section]);
         NSString *key(name == nil ? @"" : name);
 
-#if 0
-        Section **section;
-
-        _profile(SectionsView$reloadData$Section)
-            section = &sections[key];
-            if (*section == nil) {
-                _profile(SectionsView$reloadData$Section$Allocate)
-                    *section = [[[Section alloc] initWithName:name localize:YES] autorelease];
-                _end
-            }
-        _end
-
-        [*section addToCount];
-
-        _profile(SectionsView$reloadData$Filter)
-            if (![package valid] || ![package visible])
-                continue;
-        _end
-
-        [*section addToRow];
-#else
         Section *section;
 
         _profile(SectionsView$reloadData$Section)
@@ -6889,16 +6853,10 @@ freeing the view controllers on tab change */
         _end
 
         [section addToRow];
-#endif
     }
     _trace();
 
-#if 0
-    for (SectionMap::const_iterator i(sections.begin()), e(sections.end()); i != e; ++i)
-        [sections_ addObject:i->second];
-#else
     [sections_ addObjectsFromArray:[sections allValues]];
-#endif
 
     [sections_ sortUsingSelector:@selector(compareByLocalized:)];