@@ -274,18 +274,18 @@ format: (OFString *)format { self = [super init]; @try { - const char *UTF8String = [string UTF8String]; + const char *UTF8String = string.UTF8String; struct tm tm = { 0 }; int16_t tz = 0; tm.tm_isdst = -1; - if (of_strptime(UTF8String, [format UTF8String], - &tm, &tz) != UTF8String + [string UTF8StringLength]) + if (of_strptime(UTF8String, format.UTF8String, + &tm, &tz) != UTF8String + string.UTF8StringLength) @throw [OFInvalidFormatException exception]; _seconds = tmAndTzToTime(&tm, &tz); } @catch (id e) { [self release]; @@ -299,11 +299,11 @@ format: (OFString *)format { self = [super init]; @try { - const char *UTF8String = [string UTF8String]; + const char *UTF8String = string.UTF8String; struct tm tm = { 0 }; /* * of_strptime() can never set this to INT16_MAX, no matter * what is passed to it, so this is a safe way to figure out if * the date contains a time zone. @@ -310,12 +310,12 @@ */ int16_t tz = INT16_MAX; tm.tm_isdst = -1; - if (of_strptime(UTF8String, [format UTF8String], - &tm, &tz) != UTF8String + [string UTF8StringLength]) + if (of_strptime(UTF8String, format.UTF8String, + &tm, &tz) != UTF8String + string.UTF8StringLength) @throw [OFInvalidFormatException exception]; if (tz == INT16_MAX) { #ifndef OF_WINDOWS if ((_seconds = mktime(&tm)) == -1) @@ -343,15 +343,15 @@ union { double d; uint64_t u; } d; - if (![[element name] isEqual: [self className]] || - ![[element namespace] isEqual: OF_SERIALIZATION_NS]) + if (![element.name isEqual: self.className] || + ![element.namespace isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException exception]; - d.u = OF_BSWAP64_IF_LE((uint64_t)[element hexadecimalValue]); + d.u = OF_BSWAP64_IF_LE((uint64_t)element.hexadecimalValue); _seconds = OF_BSWAP_DOUBLE_IF_LE(d.d); objc_autoreleasePoolPop(pool); } @catch (id e) { [self release]; @@ -433,16 +433,16 @@ union { double d; uint64_t u; } d; - element = [OFXMLElement elementWithName: [self className] + element = [OFXMLElement elementWithName: self.className namespace: OF_SERIALIZATION_NS]; d.d = OF_BSWAP_DOUBLE_IF_LE(_seconds); - [element setStringValue: - [OFString stringWithFormat: @"%016" PRIx64, OF_BSWAP64_IF_LE(d.u)]]; + element.stringValue = + [OFString stringWithFormat: @"%016" PRIx64, OF_BSWAP64_IF_LE(d.u)]; [element retain]; objc_autoreleasePoolPop(pool); @@ -624,17 +624,17 @@ pageSize = [OFSystemInfo pageSize]; buffer = [self allocMemoryWithSize: pageSize]; @try { #ifndef OF_WINDOWS - if (strftime(buffer, pageSize, [format UTF8String], &tm) == 0) + if (strftime(buffer, pageSize, format.UTF8String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF8String: buffer]; #else if (wcsftime(buffer, pageSize / sizeof(wchar_t), - [format UTF16String], &tm) == 0) + format.UTF16String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF16String: buffer]; #endif } @finally { @@ -684,17 +684,17 @@ pageSize = [OFSystemInfo pageSize]; buffer = [self allocMemoryWithSize: pageSize]; @try { #ifndef OF_WINDOWS - if (strftime(buffer, pageSize, [format UTF8String], &tm) == 0) + if (strftime(buffer, pageSize, format.UTF8String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF8String: buffer]; #else if (wcsftime(buffer, pageSize / sizeof(wchar_t), - [format UTF16String], &tm) == 0) + format.UTF16String, &tm) == 0) @throw [OFOutOfRangeException exception]; ret = [OFString stringWithUTF16String: buffer]; #endif } @finally {