Revision: 28377
http://sourceforge.net/p/bibdesk/svn/28377
Author: hofman
Date: 2023-09-23 22:25:25 +0000 (Sat, 23 Sep 2023)
Log Message:
-----------
declare varible only when needed
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2023-09-23 22:12:48 UTC (rev 28376)
+++ trunk/bibdesk/BibItem.m 2023-09-23 22:25:25 UTC (rev 28377)
@@ -4170,8 +4170,6 @@
if([BDSKLocalUrlString isEqualToString:key])
[self setLocalUrlNeedsToBeFiled:NO];
- NSDate *theDate = nil;
-
// pubDate is a derived field based on Month and Year fields; we take the
15th day of the month to avoid edge cases
if (key == nil || allFieldsChanged || [BDSKYearString isEqualToString:key]
|| [BDSKMonthString isEqualToString:key]) {
// allows month as number, name or abbreviated name
@@ -4185,7 +4183,7 @@
if ([NSString isEmptyString:dateAddedValue]) {
[self setDateAdded:nil];
} else {
- theDate = [NSDate dateWithStandardDescription:dateAddedValue] ?:
[NSDate dateWithNaturalLanguageString:dateAddedValue];
+ NSDate *theDate = [NSDate
dateWithStandardDescription:dateAddedValue] ?: [NSDate
dateWithNaturalLanguageString:dateAddedValue];
[self setDateAdded:theDate];
}
@@ -4193,7 +4191,7 @@
if ([NSString isEmptyString:dateModValue]) {
[self setDateModified:nil];
} else {
- theDate = [NSDate dateWithStandardDescription:dateAddedValue] ?:
[NSDate dateWithNaturalLanguageString:dateAddedValue];
+ NSDate *theDate = [NSDate
dateWithStandardDescription:dateAddedValue] ?: [NSDate
dateWithNaturalLanguageString:dateAddedValue];
[self setDateModified:theDate];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit