mirror of https://github.com/CGAL/cgal
Fix the code of extract_a_sub_image, conversion warnings
This commit is contained in:
parent
eaef60dcfc
commit
dc4e41c13e
|
|
@ -23,12 +23,12 @@ int main(int argc, char **argv) {
|
|||
assert(ymax < image->ydim);
|
||||
assert(zmax < image->zdim);
|
||||
|
||||
const int new_xdim = xmax + 1 - xmin;
|
||||
const int new_ydim = ymax + 1 - ymin;
|
||||
const int new_zdim = zmax + 1 - zmin;
|
||||
const auto new_xdim = xmax + 1 - xmin;
|
||||
const auto new_ydim = ymax + 1 - ymin;
|
||||
const auto new_zdim = zmax + 1 - zmin;
|
||||
|
||||
auto *new_image = ::_createImage(new_xdim, new_ydim, new_zdim, image->vx,
|
||||
image->vx, image->vx, image->vz, image->wdim,
|
||||
auto *new_image = ::_createImage(new_xdim, new_ydim, new_zdim, 1,
|
||||
image->vx, image->vy, image->vz, image->wdim,
|
||||
image->wordKind, image->sign);
|
||||
const auto* const data = static_cast<char*>(image->data);
|
||||
auto* new_data = static_cast<char*>(new_image->data);
|
||||
|
|
|
|||
|
|
@ -319,8 +319,8 @@ CGAL_IMAGEIO_EXPORT void _freeImage(_image *im);
|
|||
@param w image word size in bytes
|
||||
@param wk image word kind
|
||||
@param sgn image word sign */
|
||||
CGAL_IMAGEIO_EXPORT _image *_createImage(int x, int y, int z, int v,
|
||||
float vx, float vy, float vz, int w,
|
||||
CGAL_IMAGEIO_EXPORT _image *_createImage(std::size_t x, std::size_t y, std::size_t z, std::size_t v,
|
||||
double vx, double vy, double vz, std::size_t w,
|
||||
WORD_KIND wk, SIGN sgn);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -623,8 +623,8 @@ _image *_initImage() {
|
|||
}
|
||||
|
||||
CGAL_INLINE_FUNCTION
|
||||
_image *_createImage(int x, int y, int z, int v,
|
||||
float vx, float vy, float vz, int w,
|
||||
_image *_createImage(std::size_t x, std::size_t y, std::size_t z, std::size_t v,
|
||||
double vx, double vy, double vz, std::size_t w,
|
||||
WORD_KIND wk, SIGN sgn)
|
||||
{
|
||||
_image *im;
|
||||
|
|
|
|||
Loading…
Reference in New Issue