aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaire Wolf <claire@symbioticeda.com>2020-04-22 18:05:12 +0200
committerClaire Wolf <claire@symbioticeda.com>2020-04-22 18:05:12 +0200
commitdf59d5997cb38a646e96f984bc222ec607e2c00f (patch)
treecc7dd443485413be73a8e3c0a163d505e811cc24
parent3fb2d2f73561d05050e83e623a3d3c3e0e60dc01 (diff)
downloadicestorm-df59d5997cb38a646e96f984bc222ec607e2c00f.tar.gz
icestorm-df59d5997cb38a646e96f984bc222ec607e2c00f.tar.bz2
icestorm-df59d5997cb38a646e96f984bc222ec607e2c00f.zip
Cleanup FpgaConfig::write_cram_pbm tile_type initialization
Signed-off-by: Claire Wolf <claire@symbioticeda.com>
-rw-r--r--icepack/icepack.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/icepack/icepack.cc b/icepack/icepack.cc
index 2eec7ed..490bbbf 100644
--- a/icepack/icepack.cc
+++ b/icepack/icepack.cc
@@ -974,17 +974,9 @@ void FpgaConfig::write_cram_pbm(std::ostream &ofs, int bank_num) const
// We require random access to tile_type, so ensure that each column of each
// bank is initialised so that all possible indices are valid
for (int bank = 0; bank < 4; bank++) {
- tile_type[bank].reserve(this->cram_width);
-
- for (int x = 0; x < this->cram_width; x++) {
- tile_type[bank].push_back(vector<uint32_t>(this->cram_height));
-
- for (int y = 0; y < this->cram_height; y++) {
- // Initialisation value unimportant - will be overwritten during
- // image generation
- tile_type[bank][x].push_back(0);
- }
- }
+ tile_type[bank].resize(this->cram_width);
+ for (int x = 0; x < this->cram_width; x++)
+ tile_type[bank][x].resize(this->cram_height);
}
for (int y = 0; y <= this->chip_height()+1; y++)