Code cleanup for min/max functions. Committed on behalf of lebedev.ri (thanks!).
This commit is contained in:
@@ -15,11 +15,15 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <algorithm>
|
||||
|
||||
#include "guiutils.h"
|
||||
#include "options.h"
|
||||
#include "../rtengine/utils.h"
|
||||
#include "rtimage.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference) {
|
||||
|
||||
Glib::ListHandle<Gtk::Widget*> list = cont->get_children ();
|
||||
@@ -203,7 +207,7 @@ void drawCrop (Cairo::RefPtr<Cairo::Context> cr, int imx, int imy, int imw, int
|
||||
else {
|
||||
int corners_from[4][2];
|
||||
int corners_to[4][2];
|
||||
int mindim = MIN (rectx2-rectx1+1, recty2-recty1+1);
|
||||
int mindim = min(rectx2-rectx1+1, recty2-recty1+1);
|
||||
corners_from[0][0] = rectx1;
|
||||
corners_from[0][1] = recty1;
|
||||
corners_to[0][0] = rectx1 + mindim;
|
||||
|
Reference in New Issue
Block a user