GreycLab/CImg

Typo

Closed this issue · 6 comments

Hey, you don't have a contributing.md so I was unsure how to suggest corrections.

Line 2079 has:

// necessary stuffs to ensure a correct declaration order of the classes and functions

Should be stuff (not stuffs).

Very well written library, learned a lot reading it - still not done (y)

By the way - any particular reason why CImgException uses a char * and not an std::string?

Thanks. I'll fix it.
About CImgException, I'm not really sure what the advantage of using std::string would be. This is basically a wrapper for a char* to me, so I preferred to keep it simple.
I admit I don't use std::string at all.

Thanks for the quick response.

As for std::string - Well, it does the memory management itself (so you wouldn't need to define a destructor). You'd also not need to define it at a fixed size and have the standard library take care of overflows for you. It's not a big deal - I just wanted to know if there was a deeper reason for not using it.

Ah yes, you are right about the fixed size.
I wonder why I have done that :) (CImgException class is quite old code I admit).
I'll try to improve this. Thanks for reporting.

Latest commit :
f65bdfb

should improve the allocation of char* buffers for the error messages.

Thanks for fixing both issues.

As a tip - next time you commit in GH - if you add the phrase closes #nnn it closes issue #nnn with the commit for you. So closes #29 would work here.

Thanks again.