Permalink
Browse files

made CLCGModel NSCopying compliant

  • Loading branch information...
1 parent 3e91bd2 commit d24a09432360cfe6463094cd70b6151a0dc28f1a @ettore committed Jan 5, 2013
Showing with 11 additions and 7 deletions.
  1. +2 −4 CLCGModel.h
  2. +9 −3 CLCGModel.m
View
@@ -1,12 +1,10 @@
//
// CLCGModel.h
-// Goodreads
-//
+// Cubelogic
// Created by Ettore Pasquini on 10/31/12.
//
-//
-@interface CLCGModel : NSObject
+@interface CLCGModel : NSObject <NSCopying>
{
// for search purposes: concatenation of searchable data
NSString *mSearchable;
View
@@ -1,10 +1,8 @@
//
// CLCGModel.m
-// Goodreads
-//
+// Cubelogic
// Created by Ettore Pasquini on 10/31/12.
//
-//
#import "CLCGModel.h"
@@ -21,6 +19,14 @@ -(void)dealloc
}
+-(id)copyWithZone:(NSZone*)zone
+{
+ CLCGModel *copy = [[[self class] allocWithZone:zone] init];
+ [copy setSearchable:[self searchable]];
+ return copy;
+}
+
+
/**
* Returns YES if this user matches all the input words.
* NB: Each word must be a lowercase string.

0 comments on commit d24a094

Please sign in to comment.