summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-11-13 14:07:29 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-11-15 14:39:13 -0800
commit233dfdfd80a6650680e45079030c28c7b7611017 (patch)
treed07202794754a47ce9a5902f07d9b8f8b6d24157
parent53bed0ff214c2e523037c94a62244b863d0c6eec (diff)
Use lowercase identifiers always, even internally.
-rw-r--r--MobileCydia.mm12
1 files changed, 9 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 1be5d28..6f8737f 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -2153,6 +2153,13 @@ struct PackageNameOrdering :
name_.set(pool, iterator_.Display());
_end
+ _profile(Package$lowercaseString)
+ char *data(id_.data());
+ for (size_t i(0), e(id_.size()); i != e; ++i)
+ // XXX: do not use tolower() as this is not locale-specific? :(
+ data[i] |= 0x20;
+ _end
+
if (!file_.end()) {
_profile(Package$initWithVersion$Source)
source_ = [database_ getSource:file_.File()];
@@ -2183,10 +2190,9 @@ struct PackageNameOrdering :
_end
bool changed(false);
- NSString *key([static_cast<id>(id_) lowercaseString]);
_profile(Package$initWithVersion$Metadata)
- metadata_ = [Packages_ objectForKey:key];
+ metadata_ = [Packages_ objectForKey:id_];
if (metadata_ == nil) {
firstSeen_ = now_;
@@ -2226,7 +2232,7 @@ struct PackageNameOrdering :
metadata_ = [metadata_ retain];
if (changed) {
- [Packages_ setObject:metadata_ forKey:key];
+ [Packages_ setObject:metadata_ forKey:id_];
Changed_ = true;
}
_end