fix style errors

This commit is contained in:
Richard Frith-Macdonald 2018-03-15 14:09:14 +00:00
parent b8185fa6c1
commit 7c1b9b4d15
2 changed files with 10 additions and 5 deletions

View file

@ -74,8 +74,8 @@ extern "C" {
- (NSUInteger) length;
/** Returns the string content of the receiver.<br />
* NB. this is actually a proxy to the internal content (which may change)
* so if you need an immutable instance yu should copy the returned value,
* not jhust retain it.
* so if you need an immutable instance you should copy the returned value,
* not just retain it.
*/
- (NSString*) string; //Primitive method!

View file

@ -243,7 +243,9 @@ appendUIntData(NSMutableData *d, NSUInteger i)
if (![aDecoder containsValueForKey: @"NSAttributeInfo"])
{
NSDictionary *attributes = [aDecoder decodeObjectForKey: @"NSAttributes"];
NSDictionary *attributes;
attributes = [aDecoder decodeObjectForKey: @"NSAttributes"];
self = [self initWithString: string attributes: attributes];
}
else
@ -550,7 +552,8 @@ appendUIntData(NSMutableData *d, NSUInteger i)
if (NSMaxRange(rangeLimit) > [self length])
{
[NSException raise: NSRangeException
format: @"RangeError in method -attribute:atIndex:longestEffectiveRange:inRange: in class NSAttributedString"];
format: @"RangeError in method %@ in class %@",
NSStringFromSelector(_cmd), NSStringFromClass([self class])];
}
if (attributeName == nil)
@ -745,7 +748,9 @@ appendUIntData(NSMutableData *d, NSUInteger i)
if (![aDecoder containsValueForKey: @"NSAttributeInfo"])
{
NSDictionary *attributes = [aDecoder decodeObjectForKey: @"NSAttributes"];
NSDictionary *attributes;
attributes = [aDecoder decodeObjectForKey: @"NSAttributes"];
self = [self initWithString: string attributes: attributes];
}
else