Changeset 3994 for trunk


Ignore:
Timestamp:
Oct 3, 2013, 4:58:36 PM (11 years ago)
Author:
ldelgass
Message:

Remove some unnecessary casts

Location:
trunk/packages/vizservers/vtkvis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/PPMWriter.cpp

    r3615 r3994  
    8080    unsigned char *destRowPtr = mesg + length - bytesPerRow;
    8181    int y;
    82     unsigned char *srcRowPtr = const_cast<unsigned char *>(data);
     82    const unsigned char *srcRowPtr = data;
    8383    for (y = 0; y < height; y++) {
    8484        memcpy(destRowPtr, srcRowPtr, bytesPerRow);
     
    155155    size_t bytesPerRow = width * 3;
    156156    int y;
    157     unsigned char *srcRowPtr = const_cast<unsigned char *>(data);
     157    const unsigned char *srcRowPtr = data;
    158158    for (y = height + 1; y >= 2; y--) {
    159159        iov[y].iov_base = srcRowPtr;
  • trunk/packages/vizservers/vtkvis/RenderServer.cpp

    r3818 r3994  
    467467        if (response == NULL)
    468468            continue;
    469         if (fwrite(response->message(), sizeof(char), response->length(),
     469        if (fwrite(response->message(), sizeof(unsigned char), response->length(),
    470470                   g_fOut) != response->length()) {
    471471            ERROR("short write while trying to write %ld bytes",
  • trunk/packages/vizservers/vtkvis/TGAWriter.cpp

    r3615 r3994  
    7373    memcpy(mesg, command, cmdLength);
    7474    memcpy(mesg + cmdLength, header, headerLength);
    75     memcpy(mesg + cmdLength + headerLength,
    76            const_cast<unsigned char *>(data), dataLength);
     75    memcpy(mesg + cmdLength + headerLength, data, dataLength);
    7776
    7877    Response *response = NULL;
     
    139138    iov[1].iov_len = headerLength;
    140139    // Image data **must be BGR(A)!**
    141     iov[2].iov_base = const_cast<unsigned char *>(data);
     140    iov[2].iov_base = data;
    142141    iov[2].iov_len = dataLength;
    143142
Note: See TracChangeset for help on using the changeset viewer.