diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-19 15:10:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-20 09:06:54 +0100 |
commit | fe9d002ef55e30aa3629f4e1951beb18ebb692b0 (patch) | |
tree | 1c72b3d97c34801d23ab1d9509aa56081e4d401f /vcl/source/filter/jpeg/JpegWriter.cxx | |
parent | f6cfe99d22041061b8042cdab05e57180c0ab70a (diff) |
Some more loplugin:cstylecast: vcl
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
Diffstat (limited to 'vcl/source/filter/jpeg/JpegWriter.cxx')
-rw-r--r-- | vcl/source/filter/jpeg/JpegWriter.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index 09a52500e951..16e6ccf17d63 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx @@ -40,11 +40,11 @@ struct DestinationManagerStruct extern "C" void init_destination (j_compress_ptr cinfo) { - DestinationManagerStruct * destination = (DestinationManagerStruct *) cinfo->dest; + DestinationManagerStruct * destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); /* Allocate the output buffer -- it will be released when done with image */ destination->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, BUFFER_SIZE * sizeof(JOCTET)); + (*cinfo->mem->alloc_small) (reinterpret_cast<j_common_ptr>(cinfo), JPOOL_IMAGE, BUFFER_SIZE * sizeof(JOCTET)); destination->pub.next_output_byte = destination->buffer; destination->pub.free_in_buffer = BUFFER_SIZE; @@ -52,7 +52,7 @@ extern "C" void init_destination (j_compress_ptr cinfo) extern "C" boolean empty_output_buffer (j_compress_ptr cinfo) { - DestinationManagerStruct * destination = (DestinationManagerStruct *) cinfo->dest; + DestinationManagerStruct * destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); if (destination->stream->Write(destination->buffer, BUFFER_SIZE) != (size_t) BUFFER_SIZE) { @@ -67,7 +67,7 @@ extern "C" boolean empty_output_buffer (j_compress_ptr cinfo) extern "C" void term_destination (j_compress_ptr cinfo) { - DestinationManagerStruct * destination = (DestinationManagerStruct *) cinfo->dest; + DestinationManagerStruct * destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); size_t datacount = BUFFER_SIZE - destination->pub.free_in_buffer; /* Write any data remaining in the buffer */ @@ -94,10 +94,10 @@ void jpeg_svstream_dest (j_compress_ptr cinfo, void* output) if (cinfo->dest == NULL) { /* first time for this JPEG object? */ cinfo->dest = (jpeg_destination_mgr*) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(DestinationManagerStruct)); + (*cinfo->mem->alloc_small) (reinterpret_cast<j_common_ptr>(cinfo), JPOOL_PERMANENT, sizeof(DestinationManagerStruct)); } - destination = (DestinationManagerStruct *) cinfo->dest; + destination = reinterpret_cast<DestinationManagerStruct *>(cinfo->dest); destination->pub.init_destination = init_destination; destination->pub.empty_output_buffer = empty_output_buffer; destination->pub.term_destination = term_destination; |