From e16e4d4de1fb68fc5d4132b029fe842343fad075 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Tue, 14 Sep 2010 05:11:15 +0000 Subject: [PATCH] Small optimization. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38642 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/linprog/Constraint.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/linprog/Constraint.cpp b/src/libs/linprog/Constraint.cpp index 3486d2cb9b..3b2798ffe0 100644 --- a/src/libs/linprog/Constraint.cpp +++ b/src/libs/linprog/Constraint.cpp @@ -227,6 +227,9 @@ Constraint::SetRightSide(double value) if (!fIsValid) return; + if (fRightSide == value) + return; + fRightSide = value; if (!set_rh(fLS->fLP, Index(), fRightSide)) STRACE(("Error in set_rh."));