From f0b2a12015dc05383ce92fd7c7ad433faeda462a Mon Sep 17 00:00:00 2001 From: David Tschumperle Date: Mon, 29 Jan 2024 11:10:08 +0100 Subject: [PATCH 1/2] . --- CImg.h | 2 +- html/header.html | 2 +- html/header_doxygen.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CImg.h b/CImg.h index b345c9de..7291cc74 100644 --- a/CImg.h +++ b/CImg.h @@ -18040,7 +18040,7 @@ namespace cimg_library { // Check for particular case to be simplified. if ((op==mp_self_add || op==mp_self_sub) && !arg2) _cimg_mp_return(arg1); - if ((op==mp_self_mul || op==mp_self_div) && arg2==1) _cimg_mp_return(arg1); + if ((op==mp_self_mul || op==mp_self_div || op==mp_self_pow) && arg2==1) _cimg_mp_return(arg1); // Apply operator on a copy to prevent modifying a constant or a variable. if (*ref && (_cimg_mp_is_const_scalar(arg1) || _cimg_mp_is_vector(arg1) || _cimg_mp_is_reserved(arg1))) diff --git a/html/header.html b/html/header.html index fcb7e248..8cee8c54 100644 --- a/html/header.html +++ b/html/header.html @@ -23,7 +23,7 @@
Logo

- Latest stable version: 3.3.3 + Latest stable version: 3.3.3        Current pre-release: 3.3.4 (2024/01/29)


diff --git a/html/header_doxygen.html b/html/header_doxygen.html index aa26bd04..f2c5d225 100644 --- a/html/header_doxygen.html +++ b/html/header_doxygen.html @@ -26,7 +26,7 @@
Logo

- Latest stable version: 3.3.3 + Latest stable version: 3.3.3        Current pre-release: 3.3.4 (2024/01/29)


From 78d16fef9e4212296da937983662e90b3e56c715 Mon Sep 17 00:00:00 2001 From: David Tschumperle Date: Mon, 29 Jan 2024 11:15:53 +0100 Subject: [PATCH 2/2] . --- CImg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/CImg.h b/CImg.h index 7291cc74..b3d8deb0 100644 --- a/CImg.h +++ b/CImg.h @@ -18041,6 +18041,7 @@ namespace cimg_library { // Check for particular case to be simplified. if ((op==mp_self_add || op==mp_self_sub) && !arg2) _cimg_mp_return(arg1); if ((op==mp_self_mul || op==mp_self_div || op==mp_self_pow) && arg2==1) _cimg_mp_return(arg1); + if (op==mp_self_pow) { CImg::vector((ulongT)mp_copy,arg1,1).move_to(code); _cimg_mp_return(arg1); } // Apply operator on a copy to prevent modifying a constant or a variable. if (*ref && (_cimg_mp_is_const_scalar(arg1) || _cimg_mp_is_vector(arg1) || _cimg_mp_is_reserved(arg1)))