fix: issues running Analyze
This commit is contained in:
@@ -805,7 +805,7 @@
|
|||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 16668;
|
CURRENT_PROJECT_VERSION = 16683;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = UY657LKNHJ;
|
DEVELOPMENT_TEAM = UY657LKNHJ;
|
||||||
@@ -866,7 +866,7 @@
|
|||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 16668;
|
CURRENT_PROJECT_VERSION = 16683;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = UY657LKNHJ;
|
DEVELOPMENT_TEAM = UY657LKNHJ;
|
||||||
|
|||||||
@@ -189,7 +189,8 @@
|
|||||||
- (NSUInteger)countUnread {
|
- (NSUInteger)countUnread {
|
||||||
NSUInteger count = 0;
|
NSUInteger count = 0;
|
||||||
for (FeedArticle *article in self.articles) {
|
for (FeedArticle *article in self.articles) {
|
||||||
count += article.unread;
|
if (article.unread)
|
||||||
|
count += 1;
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
// Unread articles list & mark articled read
|
// Unread articles list & mark articled read
|
||||||
+ (NSArray<FeedArticle*>*)articlesAtPath:(nullable NSString*)path isFeed:(BOOL)feedFlag sorted:(BOOL)sortFlag unread:(BOOL)readFlag inContext:(NSManagedObjectContext*)moc limit:(NSUInteger)limit;
|
+ (NSArray<FeedArticle*>*)articlesAtPath:(nullable NSString*)path isFeed:(BOOL)feedFlag sorted:(BOOL)sortFlag unread:(BOOL)readFlag inContext:(NSManagedObjectContext*)moc limit:(NSUInteger)limit;
|
||||||
+ (NSArray<NSString*>*)updateArticles:(NSArray<FeedArticle*>*)list markRead:(BOOL)markRead andOpen:(BOOL)openLinks inContext:(NSManagedObjectContext*)moc;
|
+ (nullable NSArray<NSString*>*)updateArticles:(NSArray<FeedArticle*>*)list markRead:(BOOL)markRead andOpen:(BOOL)openLinks inContext:(NSManagedObjectContext*)moc;
|
||||||
|
|
||||||
// Restore sound state
|
// Restore sound state
|
||||||
+ (void)cleanupAndShowAlert:(BOOL)flag;
|
+ (void)cleanupAndShowAlert:(BOOL)flag;
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
|
|
||||||
@return @c notificationID for all articles that were opened (empty if @c openLinks=NO or open failed).
|
@return @c notificationID for all articles that were opened (empty if @c openLinks=NO or open failed).
|
||||||
*/
|
*/
|
||||||
+ (NSArray<NSString*>*)updateArticles:(NSArray<FeedArticle*>*)list markRead:(BOOL)markRead andOpen:(BOOL)openLinks inContext:(NSManagedObjectContext*)moc {
|
+ (nullable NSArray<NSString*>*)updateArticles:(NSArray<FeedArticle*>*)list markRead:(BOOL)markRead andOpen:(BOOL)openLinks inContext:(NSManagedObjectContext*)moc {
|
||||||
if (openLinks) {
|
if (openLinks) {
|
||||||
NSMutableArray<NSURL*> *urls = [NSMutableArray arrayWithCapacity:list.count];
|
NSMutableArray<NSURL*> *urls = [NSMutableArray arrayWithCapacity:list.count];
|
||||||
for (FeedArticle *fa in list) {
|
for (FeedArticle *fa in list) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
@import Cocoa;
|
@import Cocoa;
|
||||||
|
|
||||||
CGMutablePathRef tinySVG_path(CGFloat scale, const char * code);
|
|
||||||
void svgAddPath(CGContextRef context, CGFloat scale, const char * path);
|
void svgAddPath(CGContextRef context, CGFloat scale, const char * path);
|
||||||
void svgAddCircle(CGContextRef context, CGFloat scale, CGFloat x, CGFloat y, CGFloat radius, bool clockwise);
|
void svgAddCircle(CGContextRef context, CGFloat scale, CGFloat x, CGFloat y, CGFloat radius, bool clockwise);
|
||||||
void svgAddRect(CGContextRef context, CGFloat scale, CGRect rect, CGFloat cornerRadius);
|
void svgAddRect(CGContextRef context, CGFloat scale, CGRect rect, CGFloat cornerRadius);
|
||||||
|
|||||||
@@ -83,10 +83,7 @@ inline static void continueNum(char chr, struct SVGState *state) {
|
|||||||
# pragma mark - Parser
|
# pragma mark - Parser
|
||||||
|
|
||||||
/// very basic svg path parser.
|
/// very basic svg path parser.
|
||||||
/// @returns @c CGMutablePathRef which must be released with @c CGPathRelease()
|
static void tinySVG_parse(const char * code, CGFloat scale, CGMutablePathRef path) {
|
||||||
CGMutablePathRef tinySVG_path(CGFloat scale, const char * code) {
|
|
||||||
CGMutablePathRef path = CGPathCreateMutable();
|
|
||||||
|
|
||||||
struct SVGState state = {
|
struct SVGState state = {
|
||||||
.scale = scale,
|
.scale = scale,
|
||||||
.op = '_',
|
.op = '_',
|
||||||
@@ -139,17 +136,17 @@ CGMutablePathRef tinySVG_path(CGFloat scale, const char * code) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# pragma mark - External API
|
# pragma mark - External API
|
||||||
|
|
||||||
/// calls @c tinySVG_path and handles @c CGPath creation and release.
|
/// calls @c tinySVG_path and handles @c CGPath creation and release.
|
||||||
void svgAddPath(CGContextRef context, CGFloat scale, const char * path) {
|
void svgAddPath(CGContextRef context, CGFloat scale, const char * code) {
|
||||||
CGMutablePathRef tmp = tinySVG_path(scale, path);
|
CGMutablePathRef path = CGPathCreateMutable();
|
||||||
CGContextAddPath(context, tmp);
|
tinySVG_parse(code, scale, path);
|
||||||
CGPathRelease(tmp);
|
CGContextAddPath(context, path);
|
||||||
|
CGPathRelease(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// calls @c CGPathAddArc with full circle
|
/// calls @c CGPathAddArc with full circle
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ static NotificationType notifyType;
|
|||||||
/// @param identifier Used to identify a specific instance (and dismiss a previously shown notification).
|
/// @param identifier Used to identify a specific instance (and dismiss a previously shown notification).
|
||||||
+ (void)send:(NSString *)identifier title:(nullable NSString *)title body:(nullable NSString *)body {
|
+ (void)send:(NSString *)identifier title:(nullable NSString *)title body:(nullable NSString *)body {
|
||||||
UNMutableNotificationContent *msg = [UNMutableNotificationContent new];
|
UNMutableNotificationContent *msg = [UNMutableNotificationContent new];
|
||||||
msg.title = title;
|
if (title) msg.title = title;
|
||||||
msg.body = body;
|
if (body) msg.body = body;
|
||||||
// common settings:
|
// common settings:
|
||||||
// TODO: make sound configurable?
|
// TODO: make sound configurable?
|
||||||
msg.sound = [UNNotificationSound defaultSound];
|
msg.sound = [UNNotificationSound defaultSound];
|
||||||
|
|||||||
Reference in New Issue
Block a user