Commit f2be27d3 authored by Jacob Potter's avatar Jacob Potter

Regenerate generated source in example/

parent 41b38086
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
@interface TXSItemList : NSObject @interface TXSItemList : NSObject
- (id)initWithItemList:(TXSItemList *)itemList; - (id)initWithItemList:(TXSItemList *)itemList;
- (id)initWithItems:(NSMutableArray *)items; - (id)initWithItems:(NSArray *)items;
@property (nonatomic, readonly) NSMutableArray *items; @property (nonatomic, readonly) NSArray *items;
@end @end
...@@ -12,17 +12,18 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for th ...@@ -12,17 +12,18 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for th
- (id)initWithItemList:(TXSItemList *)itemList - (id)initWithItemList:(TXSItemList *)itemList
{ {
if (self = [super init]) { if (self = [super init]) {
_items = [NSMutableArray arrayWithCapacity:[itemList.items count]]; NSMutableArray *_itemsTempArray = [NSMutableArray arrayWithCapacity:[itemList.items count]];
for (NSString *currentValue_0 in itemList.items) { for (NSString *currentValue_0 in itemList.items) {
id copiedValue_0; id copiedValue_0;
copiedValue_0 = [currentValue_0 copy]; copiedValue_0 = [currentValue_0 copy];
[_items addObject:copiedValue_0]; [_itemsTempArray addObject:copiedValue_0];
} }
_items = _itemsTempArray;
} }
return self; return self;
} }
- (id)initWithItems:(NSMutableArray *)items - (id)initWithItems:(NSArray *)items
{ {
if (self = [super init]) { if (self = [super init]) {
_items = items; _items = items;
...@@ -33,13 +34,14 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for th ...@@ -33,13 +34,14 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for th
- (id)initWithCppItemList:(const ::textsort::ItemList &)itemList - (id)initWithCppItemList:(const ::textsort::ItemList &)itemList
{ {
if (self = [super init]) { if (self = [super init]) {
_items = [NSMutableArray arrayWithCapacity:itemList.items.size()]; NSMutableArray *_itemsTempArray = [NSMutableArray arrayWithCapacity:itemList.items.size()];
for (const auto & cppValue_0 : itemList.items) { for (const auto & cppValue_0 : itemList.items) {
NSString *objcValue_0 = [[NSString alloc] initWithBytes:cppValue_0.data() NSString *objcValue_0 = [[NSString alloc] initWithBytes:cppValue_0.data()
length:cppValue_0.length() length:cppValue_0.length()
encoding:NSUTF8StringEncoding]; encoding:NSUTF8StringEncoding];
[_items addObject:objcValue_0]; [_itemsTempArray addObject:objcValue_0];
} }
_items = _itemsTempArray;
} }
return self; return self;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment