@@ -18671,6 +18671,7 @@ namespace cimg_library {
1867118671 s0+=6; while (cimg::is_blank(*s0)) ++s0;
1867218672 variable_name.resize(variable_name.end() - s0,1,1,1,0,0,1);
1867318673 }
18674+
1867418675 if (cimg::is_varname(variable_name)) { // Valid variable name
1867518676
1867618677 // Assign variable (direct).
@@ -18912,6 +18913,7 @@ namespace cimg_library {
1891218913 } else // From scalar
1891318914 CImg<ulongT>::vector((ulongT)mp_vector_init,arg1,(ulongT)size(arg1),1,arg2,0).
1891418915 move_to(code);
18916+ return_comp = false;
1891518917 _cimg_mp_return(arg1);
1891618918 }
1891718919
@@ -18931,9 +18933,9 @@ namespace cimg_library {
1893118933 } else
1893218934 CImg<ulongT>::vector((ulongT)mp_copy,arg1,arg2).move_to(code);
1893318935 }
18936+ return_comp = false;
18937+ _cimg_mp_return(arg1);
1893418938 }
18935- return_comp = false;
18936- _cimg_mp_return(arg1);
1893718939 }
1893818940
1893918941 // No assignment expressions match -> error.
@@ -64901,10 +64903,8 @@ namespace cimg_library {
6490164903 template<typename t>
6490264904 CImgList<t>& move_to(CImgList<t>& list) {
6490364905 list.assign(_width);
64904- bool is_one_shared_element = false;
64905- cimglist_for(*this,l) is_one_shared_element|=_data[l]._is_shared;
64906- if (is_one_shared_element) cimglist_for(*this,l) list[l].assign(_data[l]);
64907- else cimglist_for(*this,l) _data[l].move_to(list[l]);
64906+ cimglist_for(*this,l) if (_data[l]._is_shared) { list[l].assign(_data[l]); _data[l].assign(); }
64907+ cimglist_for(*this,l) if (_data[l]) _data[l].move_to(list[l]);
6490864908 assign();
6490964909 return list;
6491064910 }
@@ -64921,10 +64921,8 @@ namespace cimg_library {
6492164921 if (is_empty()) return list;
6492264922 const unsigned int npos = pos>list._width?list._width:pos;
6492364923 list.insert(_width,npos);
64924- bool is_one_shared_element = false;
64925- cimglist_for(*this,l) is_one_shared_element|=_data[l]._is_shared;
64926- if (is_one_shared_element) cimglist_for(*this,l) list[npos + l].assign(_data[l]);
64927- else cimglist_for(*this,l) _data[l].move_to(list[npos + l]);
64924+ cimglist_for(*this,l) if (_data[l]._is_shared) { list[npos + l].assign(_data[l]); _data[l].assign(); }
64925+ cimglist_for(*this,l) if (_data[l]) _data[l].move_to(list[npos + l]);
6492864926 assign();
6492964927 return list;
6493064928 }
0 commit comments