summaryrefslogtreecommitdiff
path: root/bindings/objc/src/SwordVerseManager.mm
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/objc/src/SwordVerseManager.mm')
-rw-r--r--bindings/objc/src/SwordVerseManager.mm14
1 files changed, 7 insertions, 7 deletions
diff --git a/bindings/objc/src/SwordVerseManager.mm b/bindings/objc/src/SwordVerseManager.mm
index a9bc12b..72f26fc 100644
--- a/bindings/objc/src/SwordVerseManager.mm
+++ b/bindings/objc/src/SwordVerseManager.mm
@@ -21,7 +21,7 @@
@synthesize booksPerVersification;
+ (SwordVerseManager *)defaultManager {
- static SwordVerseManager *singleton;
+ static SwordVerseManager *singleton = nil;
if(!singleton) {
singleton = [[SwordVerseManager alloc] init];
}
@@ -33,7 +33,7 @@
self = [super init];
if(self) {
self.booksPerVersification = [NSMutableDictionary dictionary];
- verseMgr = sword::VerseMgr::getSystemVerseMgr();
+ verseMgr = sword::VersificationMgr::getSystemVersificationMgr();
}
return self;
@@ -59,13 +59,13 @@
NSArray *ret = [booksPerVersification objectForKey:verseScheme];
if(ret == nil) {
// hasn't been initialized yet
- const sword::VerseMgr::System *system = verseMgr->getVersificationSystem([verseScheme UTF8String]);
- int bookCount = system->getBookCount();
+ const sword::VersificationMgr::System *system = verseMgr->getVersificationSystem([verseScheme UTF8String]);
+ NSUInteger bookCount = (NSUInteger)system->getBookCount();
NSMutableArray *buf = [NSMutableArray arrayWithCapacity:bookCount];
for(int i = 0;i < bookCount;i++) {
- sword::VerseMgr::Book *book = (sword::VerseMgr::Book *)system->getBook(i);
+ sword::VersificationMgr::Book *book = (sword::VersificationMgr::Book *)system->getBook(i);
- SwordBibleBook *bb = [[SwordBibleBook alloc] initWithBook:book];
+ SwordBibleBook *bb = [[[SwordBibleBook alloc] initWithBook:book] autorelease];
[bb setNumber:i+1]; // VerseKey-Book() starts at index 1
// add to array
@@ -78,7 +78,7 @@
return ret;
}
-- (sword::VerseMgr *)verseMgr {
+- (sword::VersificationMgr *)verseMgr {
return verseMgr;
}