summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm14
1 files changed, 10 insertions, 4 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 5f9e1d8..b7050fc 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -3685,9 +3685,13 @@ static NSString *Warning_;
}
- (NSString *) mappedSectionForPointer:(const char *)section {
- _H<NSString> &mapped(sections_[section]);
+ _H<NSString> *mapped;
- if (mapped == NULL) {
+ _profile(Database$mappedSectionForPointer$Cache)
+ mapped = &sections_[section];
+ _end
+
+ if (*mapped == NULL) {
size_t length(strlen(section));
char spaced[length + 1];
@@ -3704,9 +3708,11 @@ static NSString *Warning_;
_end
_profile(Database$mappedSectionForPointer$Map)
- mapped = [SectionMap_ objectForKey:string] ?: string;
+ string = [SectionMap_ objectForKey:string] ?: string;
_end
- } return mapped;
+
+ *mapped = string;
+ } return *mapped;
}
@end