- Timestamp:
- Oct 3, 2013, 4:58:36 PM (11 years ago)
- Location:
- trunk/packages/vizservers/vtkvis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/PPMWriter.cpp
r3615 r3994 80 80 unsigned char *destRowPtr = mesg + length - bytesPerRow; 81 81 int y; 82 unsigned char *srcRowPtr = const_cast<unsigned char *>(data);82 const unsigned char *srcRowPtr = data; 83 83 for (y = 0; y < height; y++) { 84 84 memcpy(destRowPtr, srcRowPtr, bytesPerRow); … … 155 155 size_t bytesPerRow = width * 3; 156 156 int y; 157 unsigned char *srcRowPtr = const_cast<unsigned char *>(data);157 const unsigned char *srcRowPtr = data; 158 158 for (y = height + 1; y >= 2; y--) { 159 159 iov[y].iov_base = srcRowPtr; -
trunk/packages/vizservers/vtkvis/RenderServer.cpp
r3818 r3994 467 467 if (response == NULL) 468 468 continue; 469 if (fwrite(response->message(), sizeof( char), response->length(),469 if (fwrite(response->message(), sizeof(unsigned char), response->length(), 470 470 g_fOut) != response->length()) { 471 471 ERROR("short write while trying to write %ld bytes", -
trunk/packages/vizservers/vtkvis/TGAWriter.cpp
r3615 r3994 73 73 memcpy(mesg, command, cmdLength); 74 74 memcpy(mesg + cmdLength, header, headerLength); 75 memcpy(mesg + cmdLength + headerLength, 76 const_cast<unsigned char *>(data), dataLength); 75 memcpy(mesg + cmdLength + headerLength, data, dataLength); 77 76 78 77 Response *response = NULL; … … 139 138 iov[1].iov_len = headerLength; 140 139 // Image data **must be BGR(A)!** 141 iov[2].iov_base = const_cast<unsigned char *>(data);140 iov[2].iov_base = data; 142 141 iov[2].iov_len = dataLength; 143 142
Note: See TracChangeset
for help on using the changeset viewer.