use const pointer to non-const image

This commit is contained in:
Jane Tournois 2023-04-25 14:03:01 +02:00
parent edeacc498f
commit de081c89b4
5 changed files with 5 additions and 5 deletions

View File

@ -811,7 +811,7 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
image_item->set_image_weights(weights, sigma_weights); image_item->set_image_weights(weights, sigma_weights);
} }
#endif #endif
const Image* pWeights = sigma_weights > 0 Image* const pWeights = sigma_weights > 0
? image_item->image_weights() ? image_item->image_weights()
: nullptr; : nullptr;

View File

@ -302,7 +302,7 @@ Meshing_thread* cgal_code_mesh_3(const Image* pImage,
float iso_value, float iso_value,
float value_outside, float value_outside,
bool inside_is_less, bool inside_is_less,
const Image* pWeights) Image* const pWeights)
{ {
if (nullptr == pImage) { return nullptr; } if (nullptr == pImage) { return nullptr; }

View File

@ -81,5 +81,5 @@ Meshing_thread* cgal_code_mesh_3(const CGAL::Image_3* pImage,
float iso_value = 3.f, float iso_value = 3.f,
float value_outside = 0.f, float value_outside = 0.f,
bool inside_is_less = true, bool inside_is_less = true,
const CGAL::Image_3* pWeights = nullptr); CGAL::Image_3* const pWeights);
#endif #endif

View File

@ -500,7 +500,7 @@ Scene_image_item::compute_bbox() const
m_image->image()->tz+(m_image->zdim()-1) * m_image->vz())); m_image->image()->tz+(m_image->zdim()-1) * m_image->vz()));
} }
const Image* Image* const
Scene_image_item::image_weights() const Scene_image_item::image_weights() const
{ {
return &d->m_image_weights; return &d->m_image_weights;

View File

@ -45,7 +45,7 @@ public:
bool isGray(); bool isGray();
Image* m_image; Image* m_image;
const Image* image_weights() const; Image* const image_weights() const;
void set_image_weights(const Image& img, const float sigma); void set_image_weights(const Image& img, const float sigma);
float sigma_weights() const; float sigma_weights() const;