Skip to content

Commit 4f31fec

Browse files
committed
Fix any_of() return
1 parent d87dbb0 commit 4f31fec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

PExpr.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,11 @@ PEIdent::~PEIdent()
382382

383383
static bool find_enum_constant(LexicalScope*scope, perm_string name)
384384
{
385-
std::any_of(scope->enum_sets.cbegin(), scope->enum_sets.cend(),
386-
[name](const enum_type_t *cur) {
385+
return std::any_of(scope->enum_sets.cbegin(), scope->enum_sets.cend(),
386+
[name](const enum_type_t *cur) {
387387
return std::any_of(cur->names->cbegin(), cur->names->cend(),
388388
[name](const named_pexpr_t idx){return idx.name == name;});
389389
});
390-
return false;
391390
}
392391

393392
void PEIdent::declare_implicit_nets(LexicalScope*scope, NetNet::Type type)

0 commit comments

Comments
 (0)