summaryrefslogtreecommitdiff
path: root/hwpfilter/source/hgzip.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:23:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:23:07 +0100
commitfaf01b8d54737dfbb318709180966e84c7fd5614 (patch)
tree39eb9bfafef2bc994040311df27cae20e57e4635 /hwpfilter/source/hgzip.cxx
parent6491c1a603fc870fbe255d6f663c5738cbf0b4b6 (diff)
More loplugin:cstylecast: hwpfilter
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I463894b6c99fe1ebb56895c4aca8bd05a13b7c25
Diffstat (limited to 'hwpfilter/source/hgzip.cxx')
-rw-r--r--hwpfilter/source/hgzip.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/hwpfilter/source/hgzip.cxx b/hwpfilter/source/hgzip.cxx
index d4adc6961431..e813cd01b98e 100644
--- a/hwpfilter/source/hgzip.cxx
+++ b/hwpfilter/source/hgzip.cxx
@@ -184,7 +184,7 @@ size_t gz_read(gz_stream * file, voidp buf, unsigned len)
if (s->z_err == Z_STREAM_END)
{
/* Check CRC and original size */
- s->crc = crc32(s->crc, start, (uInt) (s->stream.next_out - start));
+ s->crc = crc32(s->crc, start, static_cast<uInt>(s->stream.next_out - start));
start = s->stream.next_out;
if (getLong(s) != s->crc || getLong(s) != s->stream.total_out)
@@ -200,7 +200,7 @@ size_t gz_read(gz_stream * file, voidp buf, unsigned len)
if (s->z_err != Z_OK || s->z_eof)
break;
}
- s->crc = crc32(s->crc, start, (uInt) (s->stream.next_out - start));
+ s->crc = crc32(s->crc, start, static_cast<uInt>(s->stream.next_out - start));
return len - s->stream.avail_out;
}
@@ -256,11 +256,11 @@ int gz_flush(gz_stream * file, int flush)
*/
static uLong getLong(gz_stream * s)
{
- uLong x = (unsigned char) get_byte(s);
+ uLong x = static_cast<unsigned char>(get_byte(s));
- x += ((unsigned char) get_byte(s)) << 8;
- x += ((unsigned char) get_byte(s)) << 16;
- x += ((unsigned char) get_byte(s)) << 24;
+ x += static_cast<unsigned char>(get_byte(s)) << 8;
+ x += static_cast<unsigned char>(get_byte(s)) << 16;
+ x += static_cast<unsigned char>(get_byte(s)) << 24;
if (s->z_eof)
{
s->z_err = Z_DATA_ERROR;