Browse files

Merge remote-tracking branch 'origin'

  • Loading branch information...
2 parents 2da4e54 + 551e784 commit 877d17a93f8533cc0a4c4ad5b236f96be71df754 @beelsebob committed Feb 26, 2013
Showing with 38 additions and 35 deletions.
  1. +12 −4 Stash.xcodeproj/project.pbxproj
  2. +20 −14 Stash/STADocSet.m
  3. +0 −10 Stash/STAPreferencesController.m
  4. +0 −7 Stash/STASymbol.m
  5. +6 −0 Stash/Stash-Prefix.pch
View
16 Stash.xcodeproj/project.pbxproj
@@ -571,31 +571,39 @@
1F09B01A15792B810081DC63 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CODE_SIGN_ENTITLEMENTS = Stash/Stash.entitlements;
- CODE_SIGN_IDENTITY = "Tom Davie";
+ CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Stash/Stash-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
INFOPLIST_FILE = "Stash/Stash-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE = "";
+ RUN_CLANG_STATIC_ANALYZER = YES;
WRAPPER_EXTENSION = app;
};
name = Debug;
};
1F09B01B15792B810081DC63 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
+ CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CODE_SIGN_ENTITLEMENTS = Stash/Stash.entitlements;
- CODE_SIGN_IDENTITY = "Tom Davie";
+ CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Stash/Stash-Prefix.pch";
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
INFOPLIST_FILE = "Stash/Stash-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE = "";
+ RUN_CLANG_STATIC_ANALYZER = YES;
WRAPPER_EXTENSION = app;
};
name = Release;
View
34 Stash/STADocSet.m
@@ -23,13 +23,6 @@ - (void)reload;
@implementation STADocSet
-@synthesize loaded = _loaded;
-@synthesize symbols = _symbols;
-@synthesize name = _name;
-@synthesize version = _version;
-@synthesize platform = _platform;
-@synthesize cachePath = _cachePath;
-
+ (id)docSetWithURL:(NSURL *)url cachePath:(NSString *)cachePath onceIndexed:(void(^)(STADocSet *))completion
{
return [[self alloc] initWithURL:url cachePath:cachePath onceIndexed:completion];
@@ -189,13 +182,26 @@ - (void)search:(NSString *)searchString method:(STASearchMethod)method onResult:
{
[self reload];
}
- for (STASymbol *s in [self symbols])
- {
- if ([s matches:searchString method:method])
- {
- result(s);
- }
- }
+
+#ifdef DEBUG
+ NSDate *start = [NSDate date];
+#endif
+
+ [[self symbols] enumerateObjectsWithOptions:NSEnumerationConcurrent
+ usingBlock:^(STASymbol *s,
+ NSUInteger idx,
+ BOOL *stop)
+ {
+ if ([s matches:searchString method:method])
+ {
+ result(s);
+ }
+ }];
+
+#ifdef DEBUG
+ NSTimeInterval timeInterval = [start timeIntervalSinceNow];
+ DLog(@"Enumeration time (D:%@,Q:%@) %lf", self.name, searchString, timeInterval);
+#endif
}
- (void)unload
View
10 Stash/STAPreferencesController.m
@@ -68,16 +68,6 @@ - (NSArray *)registeredDocsets;
@implementation STAPreferencesController
-@synthesize delegate = _delegate;
-@synthesize shortcutButton = _shortcutButton;
-@synthesize shortcutText = _shortcutText;
-@synthesize docsetTable = _docsetTable;
-
-@synthesize window = _window;
-@synthesize internalRegisteredDocsets = _internalRegisteredDocsets;
-
-@synthesize eventMonitor = _eventMonitor;
-
- (id)initWithNibNamed:(NSString *)nibName bundle:(NSBundle *)bundle
{
self = [super init];
View
7 Stash/STASymbol.m
@@ -12,13 +12,6 @@
@implementation STASymbol
-@synthesize language = _language;
-@synthesize symbolType = _symbolType;
-@synthesize symbolName = _symbolName;
-//@synthesize parentName = _parentName;
-@synthesize url = _url;
-@synthesize docSet = _docSet;
-
- (id)initWithLanguageString:(NSString *)language symbolTypeString:(NSString *)symbolType symbolName:(NSString *)symbolName url:(NSURL *)url docSet:(STADocSet *)docSet
{
return [self initWithLanguageString:language symbolTypeString:symbolType symbolName:symbolName parentName:nil url:url docSet:docSet];
View
6 Stash/Stash-Prefix.pch
@@ -5,3 +5,9 @@
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
+
+#ifdef DEBUG
+# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
+#else
+# define DLog(...)
+#endif

0 comments on commit 877d17a

Please sign in to comment.