@@ -25,11 +25,11 @@ #import "OFInvalidArgumentException.h" static uint32_t stringHash(void *object) { - return [(OFString *)object hash]; + return ((OFString *)object).hash; } static bool stringEqual(void *object1, void *object2) { @@ -163,11 +163,11 @@ - (of_unichar_t)nextOption { of_options_parser_option_t *iter; OFString *argument; - if (_done || _index >= [_arguments count]) + if (_done || _index >= _arguments.count) return '\0'; [_lastLongOption release]; [_argument release]; _lastLongOption = nil; @@ -174,11 +174,11 @@ _argument = nil; argument = [_arguments objectAtIndex: _index]; if (_subIndex == 0) { - if ([argument length] < 2 || + if (argument.length < 2 || [argument characterAtIndex: 0] != '-') { _done = true; return '\0'; } @@ -197,15 +197,15 @@ _index++; if ((pos = [argument rangeOfString: @"="].location) != OF_NOT_FOUND) { of_range_t range = of_range(pos + 1, - [argument length] - pos - 1); + argument.length - pos - 1); _argument = [[argument substringWithRange: range] copy]; } else - pos = [argument length]; + pos = argument.length; _lastLongOption = [[argument substringWithRange: of_range(2, pos - 2)] copy]; objc_autoreleasePoolPop(pool); @@ -234,11 +234,11 @@ _subIndex = 1; } _lastOption = [argument characterAtIndex: _subIndex++]; - if (_subIndex >= [argument length]) { + if (_subIndex >= argument.length) { _index++; _subIndex = 0; } for (iter = _options; @@ -249,16 +249,16 @@ *iter->isSpecifiedPtr = true; return _lastOption; } - if (_index >= [_arguments count]) + if (_index >= _arguments.count) return ':'; argument = [_arguments objectAtIndex: _index]; argument = [argument substringWithRange: - of_range(_subIndex, [argument length] - _subIndex)]; + of_range(_subIndex, argument.length - _subIndex)]; _argument = [argument copy]; if (iter->isSpecifiedPtr != NULL) *iter->isSpecifiedPtr = true; @@ -277,8 +277,8 @@ } - (OFArray *)remainingArguments { return [_arguments objectsInRange: - of_range(_index, [_arguments count] - _index)]; + of_range(_index, _arguments.count - _index)]; } @end