From 3a5ba594b838a4efd2e09e9f1161e5f3723f8dee Mon Sep 17 00:00:00 2001 From: Dirk Zimmermann Date: Fri, 30 Apr 2021 11:05:11 +0200 Subject: [PATCH] IOS-2794 Rename copyOfBytes -> bytes --- pantomime-lib/Framework/Pantomime/CWService+Protected.m | 2 +- .../Framework/Pantomime/Utils/CWThreadSafeData.h | 4 ++-- .../Framework/Pantomime/Utils/CWThreadSafeData.m | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pantomime-lib/Framework/Pantomime/CWService+Protected.m b/pantomime-lib/Framework/Pantomime/CWService+Protected.m index 99a81dc..61d4321 100644 --- a/pantomime-lib/Framework/Pantomime/CWService+Protected.m +++ b/pantomime-lib/Framework/Pantomime/CWService+Protected.m @@ -60,7 +60,7 @@ unsigned char *bytes; NSInteger count, len; - bytes = (unsigned char*)[_wbuf copyOfBytes]; + bytes = (unsigned char*)[_wbuf bytes]; len = [_wbuf length]; #ifdef MACOSX diff --git a/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.h b/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.h index 7d8d6ca..69dbfa3 100644 --- a/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.h +++ b/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.h @@ -49,9 +49,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)truncateLeadingBytes:(NSUInteger)numBytes; /** - @return a copy of the inner byte array. + @return a pointer to the inner byte array. */ -- (const char*)copyOfBytes; +- (const char *)bytes; /** @discussion This method is used to obtain the subdata to index diff --git a/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.m b/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.m index fa1a636..5f58f06 100644 --- a/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.m +++ b/pantomime-lib/Framework/Pantomime/Utils/CWThreadSafeData.m @@ -77,16 +77,16 @@ NS_ASSUME_NONNULL_BEGIN }); } -- (const char*)copyOfBytes +- (const char *)bytes { - __block const char* copyOfBytes = nil; + __block const char *theBytes = nil; __weak typeof(self) weakSelf = self; dispatch_sync(self.queue, ^{ typeof(self) strongSelf = weakSelf; - copyOfBytes = strongSelf.data.bytes; + theBytes = strongSelf.data.bytes; }); - return copyOfBytes; + return theBytes; } - (NSData *)subdataToIndex:(NSUInteger)index