From c2f0a314a012bea8e4ebb35b8ce9e1a85c798727 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Wed, 13 Oct 2010 05:44:52 +0000 Subject: [PATCH] Rename ReplaceObjectiveFunction to SwapObjectiveFunction I think this makes it more clear that the old function is not deleted. Cleanup Jamfile. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38960 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/libs/linprog/LinearSpec.h | 2 +- src/libs/alm/ALMLayout.cpp | 4 ++-- src/libs/linprog/LinearSpec.cpp | 2 +- src/tests/libs/alm/Jamfile | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/headers/libs/linprog/LinearSpec.h b/headers/libs/linprog/LinearSpec.h index 43ca89cb98..826be7bc50 100644 --- a/headers/libs/linprog/LinearSpec.h +++ b/headers/libs/linprog/LinearSpec.h @@ -87,7 +87,7 @@ public: SummandList* ObjectiveFunction(); //! Caller takes ownership of the Summand's and the SummandList. - SummandList* ReplaceObjectiveFunction( + SummandList* SwapObjectiveFunction( SummandList* objFunction); void SetObjectiveFunction(SummandList* objFunction); void UpdateObjectiveFunction(); diff --git a/src/libs/alm/ALMLayout.cpp b/src/libs/alm/ALMLayout.cpp index 7e5186a95c..4f94ee0c07 100644 --- a/src/libs/alm/ALMLayout.cpp +++ b/src/libs/alm/ALMLayout.cpp @@ -818,7 +818,7 @@ BALMLayout::_CalculateMinSize() SummandList* newObjFunction = new SummandList(2); newObjFunction->AddItem(new Summand(1.0, fRight)); newObjFunction->AddItem(new Summand(1.0, fBottom)); - SummandList* oldObjFunction = fSolver.ReplaceObjectiveFunction( + SummandList* oldObjFunction = fSolver.SwapObjectiveFunction( newObjFunction); _SolveLayout(); fSolver.SetObjectiveFunction(oldObjFunction); @@ -847,7 +847,7 @@ BALMLayout::_CalculateMaxSize() SummandList* newObjFunction = new SummandList(2); newObjFunction->AddItem(new Summand(-1.0, fRight)); newObjFunction->AddItem(new Summand(-1.0, fBottom)); - SummandList* oldObjFunction = fSolver.ReplaceObjectiveFunction( + SummandList* oldObjFunction = fSolver.SwapObjectiveFunction( newObjFunction); _SolveLayout(); fSolver.SetObjectiveFunction(oldObjFunction); diff --git a/src/libs/linprog/LinearSpec.cpp b/src/libs/linprog/LinearSpec.cpp index 15e6a48970..98acae1160 100644 --- a/src/libs/linprog/LinearSpec.cpp +++ b/src/libs/linprog/LinearSpec.cpp @@ -422,7 +422,7 @@ LinearSpec::ObjectiveFunction() SummandList* -LinearSpec::ReplaceObjectiveFunction(SummandList* objFunction) +LinearSpec::SwapObjectiveFunction(SummandList* objFunction) { SummandList* list = fObjFunction; fObjFunction = objFunction; diff --git a/src/tests/libs/alm/Jamfile b/src/tests/libs/alm/Jamfile index df3d16b3a5..da0fef20eb 100644 --- a/src/tests/libs/alm/Jamfile +++ b/src/tests/libs/alm/Jamfile @@ -1,7 +1,5 @@ SubDir HAIKU_TOP src tests libs alm ; -SetSubDirSupportedPlatformsBeOSCompatible ; - UseLibraryHeaders lp_solve linprog alm ; UsePrivateHeaders shared ;