Skip to content
Browse files

Cast `void *` values from NSData to types to eliminate compile errors

when compiling with objective-c++.
  • Loading branch information...
1 parent 90e5fbc commit dd83a4043d53461385c2af48bc7ed8ffe0b09eb5 @artgillespie committed Aug 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 Classes/ASIDataCompressor.m
View
4 Classes/ASIDataCompressor.m
@@ -88,7 +88,7 @@ - (NSData *)compressBytes:(Bytef *)bytes length:(NSUInteger)length error:(NSErro
[outputData increaseLengthBy:halfLength];
}
- zStream.next_out = [outputData mutableBytes] + zStream.total_out-bytesProcessedAlready;
+ zStream.next_out = (Bytef*)[outputData mutableBytes] + zStream.total_out-bytesProcessedAlready;
zStream.avail_out = (unsigned int)([outputData length] - (zStream.total_out-bytesProcessedAlready));
status = deflate(&zStream, shouldFinish ? Z_FINISH : Z_NO_FLUSH);
@@ -184,7 +184,7 @@ + (BOOL)compressDataFromFile:(NSString *)sourcePath toFile:(NSString *)destinati
}
// Write the deflated data out to the destination file
- [outputStream write:[outputData bytes] maxLength:[outputData length]];
+ [outputStream write:(const uint8_t *)[outputData bytes] maxLength:[outputData length]];
// Make sure nothing went wrong
if ([inputStream streamStatus] == NSStreamEventErrorOccurred) {

0 comments on commit dd83a40

Please sign in to comment.
Something went wrong with that request. Please try again.