From: ritsuka Date: Fri, 20 Feb 2015 08:03:55 +0000 (+0000) Subject: MacGui: add a protocol HBUniqueObject objects must implements if they are used in... X-Git-Tag: 1.0.0~1403 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c983a5fdc088d69325aafdaeaa4c1b04bea9c1f;p=handbrake MacGui: add a protocol HBUniqueObject objects must implements if they are used in a HBDistributedArray. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6929 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/HBDistributedArray.h b/macosx/HBDistributedArray.h index 4163fca17..e72484aae 100644 --- a/macosx/HBDistributedArray.h +++ b/macosx/HBDistributedArray.h @@ -8,6 +8,16 @@ extern NSString *HBDistributedArrayChanged; +/** + * Objects in HBDistributedArray + * must implement this protocol. + */ +@protocol HBUniqueObject + +@property (nonatomic, readonly) NSString *uuid; + +@end + /** * HBDistributedArray * a mutable array that share its content between processes. diff --git a/macosx/HBDistributedArray.m b/macosx/HBDistributedArray.m index 8dba9e5d1..56505ab1d 100644 --- a/macosx/HBDistributedArray.m +++ b/macosx/HBDistributedArray.m @@ -195,7 +195,7 @@ NSString *HBDistributedArraWrittenToDisk = @"HBDistributedArraWrittenToDisk"; */ - (void)reload { - NSMutableArray *jobsArray = nil;; + NSMutableArray *jobsArray = nil; @try { jobsArray = [NSKeyedUnarchiver unarchiveObjectWithFile:self.fileURL.path];