Skip to content

Commit eb5df0a

Browse files
committed
Add one-shot constructor to class_hierarchyt
Allows alloc-and-init in one go.
1 parent e39721f commit eb5df0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/goto-programs/class_hierarchy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ class class_hierarchyt
5757
void operator()(const symbol_tablet &);
5858

5959
class_hierarchyt() = default;
60+
explicit class_hierarchyt(const symbol_tablet &symbol_table)
61+
{
62+
(*this)(symbol_table);
63+
}
6064
class_hierarchyt(const class_hierarchyt &) = delete;
6165
class_hierarchyt &operator=(const class_hierarchyt &) = delete;
6266

0 commit comments

Comments
 (0)