Skip to content

Commit 652e7b7

Browse files
committed
c++, contracts: Code clean-up NFC.
1 parent 9f34d25 commit 652e7b7

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

gcc/cp/contracts.cc

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,24 +1708,14 @@ build_postcondition_function (tree fndecl)
17081708
static void
17091709
build_contract_function_decls (tree fndecl)
17101710
{
1711-
/* Constructors and destructors have their contracts inserted inline. */
1712-
if (!outline_contracts_p (fndecl))
1713-
return;
1714-
1711+
/* Build the pre/post functions (or not). */
17151712
if (!get_precondition_function (fndecl))
1716-
{
1717-
/* Build the pre/post functions (or not). */
1718-
tree pre = build_precondition_function (fndecl);
1719-
if (pre)
1720-
set_precondition_function (fndecl, pre);
1721-
}
1713+
if (tree pre = build_precondition_function (fndecl))
1714+
set_precondition_function (fndecl, pre);
17221715

17231716
if (!get_postcondition_function (fndecl))
1724-
{
1725-
tree post = build_postcondition_function (fndecl);
1726-
if (post)
1727-
set_postcondition_function (fndecl, post);
1728-
}
1717+
if (tree post = build_postcondition_function (fndecl))
1718+
set_postcondition_function (fndecl, post);
17291719
}
17301720

17311721
/* Build a layout-compatible internal version of source location __impl

0 commit comments

Comments
 (0)