From 75d9d1c2bf34ba059ba8d2f4be53954df74ea7f0 Mon Sep 17 00:00:00 2001 From: Katie Mummah Date: Thu, 14 Mar 2024 17:12:11 -0600 Subject: [PATCH] Add some comments about repackaging strategy Co-authored-by: Ahnaf Tahmid Chowdhury Signed-off-by: Katie Mummah --- src/toolkit/res_manip.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/toolkit/res_manip.cc b/src/toolkit/res_manip.cc index 37e5fbd073..b6a006610b 100644 --- a/src/toolkit/res_manip.cc +++ b/src/toolkit/res_manip.cc @@ -90,6 +90,9 @@ double GetFillMass(Resource::Ptr r, Package::Ptr pkg) { fill_mass = pkg->fill_max(); } } + // Handle the scenario when there's leftover material that cannot be packaged + // due to not enough material for minimum fill, but more than one max filled package worth of material. + // In this case, fill one package up all the way and return the remaining to the buffer. return fill_mass; }