From 0d444bfc6e073976e73840ac6647dd7adf0e243b Mon Sep 17 00:00:00 2001 From: "D. Shah" Date: Mon, 8 Feb 2021 11:24:00 +0000 Subject: Use RelSlice::ssize instead of cast-to-int throughout Signed-off-by: D. Shah --- ice40/arch.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ice40') diff --git a/ice40/arch.cc b/ice40/arch.cc index dd58361e..b7a87842 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -259,7 +259,7 @@ BelRange Arch::getBelsByTile(int x, int y) const br.e.cursor = br.b.cursor; if (br.e.cursor != -1) { - while (br.e.cursor < int(chip_info->bel_data.size()) && chip_info->bel_data[br.e.cursor].x == x && + while (br.e.cursor < chip_info->bel_data.ssize() && chip_info->bel_data[br.e.cursor].x == x && chip_info->bel_data[br.e.cursor].y == y) br.e.cursor++; } @@ -376,7 +376,7 @@ WireId Arch::getWireByName(IdStringList name) const WireId ret; if (wire_by_name.empty()) { - for (int i = 0; i < int(chip_info->wire_data.size()); i++) { + for (int i = 0; i < chip_info->wire_data.ssize(); i++) { WireId w; w.index = i; wire_by_name[getWireName(w)] = i; @@ -449,7 +449,7 @@ PipId Arch::getPipByName(IdStringList name) const PipId ret; if (pip_by_name.empty()) { - for (int i = 0; i < int(chip_info->pip_data.size()); i++) { + for (int i = 0; i < chip_info->pip_data.ssize(); i++) { PipId pip; pip.index = i; pip_by_name[getPipName(pip)] = i; -- cgit v1.2.3