From: Matthew Fernandez Date: Sat, 26 Jun 2021 18:31:59 +0000 (-0700) Subject: rephrase delete loop in Blocks::~Blocks to a range-based for-loop X-Git-Tag: 2.48.0~23^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00cb1b28b0b8c85d3c6f7d348081d66fbfb0a389;p=graphviz rephrase delete loop in Blocks::~Blocks to a range-based for-loop --- diff --git a/lib/vpsc/blocks.cpp b/lib/vpsc/blocks.cpp index 72d74a42b..3c2b97e7f 100644 --- a/lib/vpsc/blocks.cpp +++ b/lib/vpsc/blocks.cpp @@ -43,8 +43,8 @@ Blocks::Blocks(const int n, Variable *vs[]) : vs(vs),nvs(n) { Blocks::~Blocks() { blockTimeCtr=0; - for(set::iterator i=begin();i!=end();i++) { - delete *i; + for (Block *b : *this) { + delete b; } }