Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
dtschump committed Nov 21, 2023
2 parents fa720c4 + af691b4 commit e46c476
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CImg.h
Original file line number Diff line number Diff line change
Expand Up @@ -21071,6 +21071,15 @@ namespace cimg_library {
_cimg_mp_scalar1(mp_isbool,arg1);
}

if (!std::strncmp(ss,"isconst(",8)) { // Is constant?
_cimg_mp_op("Function 'isconst()'");
if (ss8==se1) _cimg_mp_return(0);
try { arg1 = compile(ss8,se1,depth1,0,block_flags); }
catch(CImgException&) { _cimg_mp_return(0); }
if (_cimg_mp_is_const_scalar(arg1)) _cimg_mp_return(1);
_cimg_mp_return(0);
}

if (!std::strncmp(ss,"isdir(",6)) { // Is directory?
_cimg_mp_op("Function 'isdir()'");
arg1 = compile(ss6,se1,depth1,0,block_flags);
Expand Down Expand Up @@ -65158,7 +65167,7 @@ namespace cimg_library {
CImg<charT> __display() const {
CImg<charT> res, str;
cimglist_for(*this,l) {
CImg<charT>::string((char*)_data[l]).move_to(str);
CImg<charT>::string((char*)_data[l]._data).move_to(str);
if (l!=width() - 1) {
str.resize(str._width + 1,1,1,1,0);
str[str._width - 2] = ',';
Expand Down

0 comments on commit e46c476

Please sign in to comment.