From c32e845f44e6e5dba377daaf238ef98b2d75e517 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 10 Jan 2001 20:19:23 +0000 Subject: [PATCH] Simple trick to get quite some speed git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8551 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/GSAttributedString.m | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 954867039..fd7d947b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-01-10 Nicola Pero + + * Source/GSAttributedString.m ([GSAttributedString -length]), + ([GSMutableAttributedString -length]): Added for speed. + 2001-01-10 Richard Frith-Macdonald * Source/Unicode.m: Fix bug in checking possible default string diff --git a/Source/GSAttributedString.m b/Source/GSAttributedString.m index d20b81e30..514831525 100644 --- a/Source/GSAttributedString.m +++ b/Source/GSAttributedString.m @@ -490,6 +490,13 @@ _attributesAtIndexEffectiveRange( [super dealloc]; } + +// The superclass implementation is correct but too slow +- (unsigned int) length +{ + return [_textChars length]; +} + @end @@ -828,6 +835,12 @@ SANITY(); [super dealloc]; } +// The superclass implementation is correct but too slow +- (unsigned int) length +{ + return [_textChars length]; +} + @end