From 8bc580beb14a3e5f9e258d698922a20cc755c147 Mon Sep 17 00:00:00 2001 From: Lijun Chen Date: Wed, 29 May 2024 20:18:18 +0200 Subject: [PATCH] fix: `GridNeighborCache` incorrectly reads parameter --- .../wireless/common/neighborcache/GridNeighborCache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/inet/physicallayer/wireless/common/neighborcache/GridNeighborCache.cc b/src/inet/physicallayer/wireless/common/neighborcache/GridNeighborCache.cc index 5e54262af7f..a385e2dfc69 100644 --- a/src/inet/physicallayer/wireless/common/neighborcache/GridNeighborCache.cc +++ b/src/inet/physicallayer/wireless/common/neighborcache/GridNeighborCache.cc @@ -42,11 +42,11 @@ void GridNeighborCache::initialize(int stage) maxSpeed = radioMedium->getMediumLimitCache()->getMaxSpeed().get(); const Coord constraintAreaSize = constraintAreaMax - constraintAreaMin; if (std::isnan(cellSize.x)) - cellSize.x = constraintAreaSize.x / par("cellCountX").doubleValue(); + cellSize.x = constraintAreaSize.x / par("cellCountX").intValue(); if (std::isnan(cellSize.y)) - cellSize.y = constraintAreaSize.y / par("cellCountY").doubleValue(); + cellSize.y = constraintAreaSize.y / par("cellCountY").intValue(); if (std::isnan(cellSize.z)) - cellSize.z = constraintAreaSize.z / par("cellCountZ").doubleValue(); + cellSize.z = constraintAreaSize.z / par("cellCountZ").intValue(); fillCubeVector(); scheduleAfter(refillPeriod, refillCellsTimer); }