@@ -105,11 +105,11 @@ { void *pool = objc_autoreleasePoolPush(); LSTATUS status; HKEY subKey; - if ((status = RegOpenKeyExW(_hKey, [path UTF16String], options, + if ((status = RegOpenKeyExW(_hKey, path.UTF16String, options, securityAndAccessRights, &subKey)) != ERROR_SUCCESS) { if (status == ERROR_FILE_NOT_FOUND) { objc_autoreleasePoolPop(pool); return nil; } @@ -148,11 +148,11 @@ { void *pool = objc_autoreleasePoolPush(); LSTATUS status; HKEY subKey; - if ((status = RegCreateKeyExW(_hKey, [path UTF16String], 0, + if ((status = RegCreateKeyExW(_hKey, path.UTF16String, 0, NULL, options, securityAndAccessRights, securityAttributes, &subKey, NULL)) != ERROR_SUCCESS) @throw [OFCreateWindowsRegistryKeyFailedException exceptionWithRegistryKey: self path: path @@ -178,12 +178,12 @@ DWORD length = sizeof(stackBuffer); OFMutableData *ret = nil; LSTATUS status; for (;;) { - status = RegGetValueW(_hKey, [subkeyPath UTF16String], - [value UTF16String], flags, type, buffer, &length); + status = RegGetValueW(_hKey, subkeyPath.UTF16String, + value.UTF16String, flags, type, buffer, &length); switch (status) { case ERROR_SUCCESS: if (buffer == stackBuffer) { objc_autoreleasePoolPop(pool); @@ -206,11 +206,11 @@ objc_autoreleasePoolPop(pool); pool = objc_autoreleasePoolPush(); ret = [OFMutableData dataWithCapacity: length]; [ret increaseCountBy: length]; - buffer = [ret items]; + buffer = ret.items; continue; default: @throw [OFGetWindowsRegistryValueFailedException exceptionWithRegistryKey: self @@ -224,18 +224,18 @@ - (void)setData: (OFData *)data forValue: (OFString *)value type: (DWORD)type { - size_t length = [data count] * [data itemSize]; + size_t length = data.count * data.itemSize; LSTATUS status; if (length > UINT32_MAX) @throw [OFOutOfRangeException exception]; - if ((status = RegSetValueExW(_hKey, [value UTF16String], 0, type, - [data items], (DWORD)length)) != ERROR_SUCCESS) + if ((status = RegSetValueExW(_hKey, value.UTF16String, 0, type, + data.items, (DWORD)length)) != ERROR_SUCCESS) @throw [OFSetWindowsRegistryValueFailedException exceptionWithRegistryKey: self value: value data: data type: type @@ -266,14 +266,14 @@ OFString *ret; if (data == nil) return nil; - UTF16String = [data items]; - length = [data count]; + UTF16String = data.items; + length = data.count; - if ([data itemSize] != 1 || length % 2 == 1) + if (data.itemSize != 1 || length % 2 == 1) @throw [OFInvalidFormatException exception]; length /= 2; /* @@ -308,13 +308,13 @@ type: (DWORD)type { void *pool = objc_autoreleasePoolPush(); OFData *data; - data = [OFData dataWithItems: [string UTF16String] + data = [OFData dataWithItems: string.UTF16String itemSize: sizeof(of_char16_t) - count: [string UTF16StringLength] + 1]; + count: string.UTF16StringLength + 1]; [self setData: data forValue: value type: type]; objc_autoreleasePoolPop(pool); @@ -323,11 +323,11 @@ - (void)deleteValue: (OFString *)value { void *pool = objc_autoreleasePoolPush(); LSTATUS status; - if ((status = RegDeleteValueW(_hKey, [value UTF16String])) != + if ((status = RegDeleteValueW(_hKey, value.UTF16String)) != ERROR_SUCCESS) @throw [OFDeleteWindowsRegistryValueFailedException exceptionWithRegistryKey: self value: value status: status]; @@ -338,15 +338,15 @@ - (void)deleteSubkeyAtPath: (OFString *)subkeyPath { void *pool = objc_autoreleasePoolPush(); LSTATUS status; - if ((status = RegDeleteKeyW(_hKey, [subkeyPath UTF16String])) != + if ((status = RegDeleteKeyW(_hKey, subkeyPath.UTF16String)) != ERROR_SUCCESS) @throw [OFDeleteWindowsRegistryKeyFailedException exceptionWithRegistryKey: self subkeyPath: subkeyPath status: status]; objc_autoreleasePoolPop(pool); } @end