diff --git a/Classes/OMColorHelper.m b/Classes/OMColorHelper.m index 713ed68..483a928 100755 --- a/Classes/OMColorHelper.m +++ b/Classes/OMColorHelper.m @@ -50,10 +50,10 @@ - (id)init [NSColor brownColor], @"brown", [[NSColor clearColor] colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]], @"clear", nil]; - _rgbaUIColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"(\\[\\s*UIColor\\s+colorWith|\\[\\s*\\[\\s*UIColor\\s+alloc\\]\\s*initWith)Red:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+green:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+blue:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s*alpha:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s*\\]" options:0 error:NULL] retain]; - _whiteUIColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"(\\[\\s*UIColor\\s+colorWith|\\[\\s*\\[\\s*UIColor\\s+alloc\\]\\s*initWith)White:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+alpha:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s*\\]" options:0 error:NULL] retain]; - _rgbaNSColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"\\[\\s*NSColor\\s+colorWith(Calibrated|Device)Red:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+green:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+blue:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+alpha:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s*\\]" options:0 error:NULL] retain]; - _whiteNSColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"\\[\\s*NSColor\\s+colorWith(Calibrated|Device)White:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s+alpha:\\s*([0-9]*\\.?[0-9]*f?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*f?)?\\s*\\]" options:0 error:NULL] retain]; + _rgbaUIColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"(\\[\\s*UIColor\\s+colorWith|\\[\\s*\\[\\s*UIColor\\s+alloc\\]\\s*initWith)Red:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+green:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+blue:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s*alpha:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s*\\]" options:0 error:NULL] retain]; + _whiteUIColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"(\\[\\s*UIColor\\s+colorWith|\\[\\s*\\[\\s*UIColor\\s+alloc\\]\\s*initWith)White:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+alpha:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s*\\]" options:0 error:NULL] retain]; + _rgbaNSColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"\\[\\s*NSColor\\s+colorWith(Calibrated|Device)Red:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+green:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+blue:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+alpha:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s*\\]" options:0 error:NULL] retain]; + _whiteNSColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"\\[\\s*NSColor\\s+colorWith(Calibrated|Device)White:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s+alpha:\\s*([0-9]*\\.?[0-9]*[Ff]?)\\s*(\\/\\s*[0-9]*\\.?[0-9]*[Ff]?)?\\s*\\]" options:0 error:NULL] retain]; _constantColorRegex = [[NSRegularExpression regularExpressionWithPattern:@"\\[\\s*(UI|NS)Color\\s+(black|darkGray|lightGray|white|gray|red|green|blue|cyan|yellow|magenta|orange|purple|brown|clear)Color\\s*\\]" options:0 error:NULL] retain]; } return self; diff --git a/OMColorSense.xcodeproj/project.pbxproj b/OMColorSense.xcodeproj/project.pbxproj index 2843686..9964980 100755 --- a/OMColorSense.xcodeproj/project.pbxproj +++ b/OMColorSense.xcodeproj/project.pbxproj @@ -161,11 +161,14 @@ DSTROOT = "$(HOME)"; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_GC = supported; + GCC_FAST_MATH = YES; GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_UNROLL_LOOPS = YES; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; LD_RUNPATH_SEARCH_PATHS = /Developer; + LLVM_LTO = YES; PRODUCT_NAME = OMColorSense; STRIP_INSTALLED_PRODUCT = NO; WRAPPER_EXTENSION = xcplugin;