From f8753a41c1476b58de7673708c5b6f5b0b34790b Mon Sep 17 00:00:00 2001 From: Andrew McCallum Date: Thu, 7 Mar 1996 02:30:04 +0000 Subject: [PATCH] ([Port -invalidate]): Insist that is_valid is true at the beginning of this method, don't test it and skip the body of this method. Force users to be careful about calling -invalidate more than once. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1088 72102866-910b-0410-8b05-ffd578937521 --- Source/Port.m | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Port.m b/Source/Port.m index e31d97f82..c8acbba5e 100644 --- a/Source/Port.m +++ b/Source/Port.m @@ -65,13 +65,12 @@ - (void) invalidate { - if (is_valid) - { - [NotificationDispatcher - postNotificationName: PortBecameInvalidNotification - object: self]; - is_valid = NO; - } + assert (is_valid); + + [NotificationDispatcher + postNotificationName: PortBecameInvalidNotification + object: self]; + is_valid = NO; } - (Class) packetClass