From 8b60bd1496f2d3a61d45ce60e74f220fb4e8f974 Mon Sep 17 00:00:00 2001
From: Romain BERNARD <romain.bernard@uca.fr>
Date: Thu, 20 Jun 2024 10:24:57 +0200
Subject: [PATCH] add practical usage comment to the add/remove weight
 functions

---
 src/routes/vehicle/SAEVRoute.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/routes/vehicle/SAEVRoute.h b/src/routes/vehicle/SAEVRoute.h
index d879a3f..2c53f70 100644
--- a/src/routes/vehicle/SAEVRoute.h
+++ b/src/routes/vehicle/SAEVRoute.h
@@ -48,11 +48,13 @@ public:
 
     /**
      * Updates weight in-between request's Origin/Destination (both included) to account for the given request's weight
+     * ⚠️ Execute this function *after* adding the request to the route, as it assumes the request is part of the route
      * @param requestId ID of the request that serves as basis for iteration and weight to add
      */
     void addRequestWeightToRoute(size_t requestId);
     /**
      * Resets current weight to 0 on the request Origin/Destination key points and decreases weight on the nodes in-between by the request's weight
+     * ⚠️ Execute this function *before* removing the request from the route, as it assumes the request is still part of the route
      * @param requestId ID of the request that serves as basis for iteration and weight to remove
      */
     void removeRequestWeightFromRoute(size_t requestId);
-- 
GitLab