Skip to content

Commit 26c01e7

Browse files
committed
Use preincrement instead of post in for loop incr
1 parent ea26587 commit 26c01e7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pform.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998-2024 Stephen Williams ([email protected])
2+
* Copyright (c) 1998-2025 Stephen Williams ([email protected])
33
* Copyright CERN 2013 / Stephen Williams ([email protected])
44
*
55
* This source code is free software; you can redistribute it
@@ -1482,7 +1482,7 @@ void pform_endmodule(const char*name, bool inside_celldefine,
14821482
void pform_genvars(const struct vlltype&li, list<pform_ident_t>*names)
14831483
{
14841484
list<pform_ident_t>::const_iterator cur;
1485-
for (cur = names->begin(); cur != names->end() ; *cur++) {
1485+
for (cur = names->begin(); cur != names->end() ; ++cur) {
14861486
PGenvar*genvar = new PGenvar();
14871487
FILE_NAME(genvar, li);
14881488

tgt-vhdl/state.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Managing global state for the VHDL code generator.
33
*
4-
* Copyright (C) 2009 Nick Gasson ([email protected])
4+
* Copyright (C) 2009-2025 Nick Gasson ([email protected])
55
*
66
* This program is free software; you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -256,7 +256,7 @@ static bool same_scope_type_name(ivl_scope_t a, ivl_scope_t b)
256256
if (nparams_a != nparams_b)
257257
return false;
258258

259-
for (unsigned i = 0; i < nparams_a; i++) {
259+
for (unsigned i = 0; i < nparams_a; ++i) {
260260
ivl_parameter_t param_a = ivl_scope_param(a, i);
261261
ivl_parameter_t param_b = ivl_scope_param(b, i);
262262

@@ -304,7 +304,7 @@ static bool same_scope_type_name(ivl_scope_t a, ivl_scope_t b)
304304
*/
305305
bool seen_this_scope_type(ivl_scope_t s)
306306
{
307-
for (auto cur = g_default_scopes.begin() ; cur != g_default_scopes.end() ; cur++) {
307+
for (auto cur = g_default_scopes.begin() ; cur != g_default_scopes.end() ; ++cur) {
308308
if (same_scope_type_name(s, *cur))
309309
return true;
310310
}

0 commit comments

Comments
 (0)