[C++ API] Making member functions const

Przemysław Sobala <[email protected]> Thu, 4 Jul 2019 17:13:57 +0200
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
Hello

What do you think about making some (all) Imageclass member functions 
that are /getters/ (don't modify the Image object) 
const(https://www.geeksforgeeks.org/const-member-functions-c/)? It'd be 
then possible to create methods that pass const Image &image as an 
argument in the API consumer - make sure that the Image object does not 
get modified.

I can see that some methods are already const:
     ImageType       type ( void ) const;
but not all of them that could be, eg:
     std::string     attribute ( const std::string name_ );

I could prepare such a patch.

--
Best regards
Przemysław Sobala

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help