diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2023-01-06 10:11:23 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2023-01-06 12:59:55 +0200 |
commit | f3b3e8ecf58611c8a3cca17d3a94e8ae23ba7788 (patch) | |
tree | 3e4076728bf8e8759c643a8b5bac3508e87882a3 | |
parent | 1fcaac64f7d4bf685e123e303a7e40a8cc60adc7 (diff) | |
download | iscan-f3b3e8ecf58611c8a3cca17d3a94e8ae23ba7788.tar.gz |
Fix ambiguous div()
-rw-r--r-- | lib/jpegstream.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/jpegstream.cc b/lib/jpegstream.cc index 66bf92d..68e6fc5 100644 --- a/lib/jpegstream.cc +++ b/lib/jpegstream.cc @@ -82,7 +82,8 @@ namespace iscan // only that _bits != 8. for (unsigned int i = 0; i < _h_sz; ++i) { - div_t index = div (i, 8 * sizeof (JSAMPLE)); + div_t index = div (static_cast<int>(i), + static_cast<int>(8 * sizeof (JSAMPLE))); int offset = 8 * sizeof (JSAMPLE) - 1 - index.rem; _scanline[i] = ((line[index.quot] & (1 << offset)) ? 0 : ~0); |