forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#24531: Use designated initializers
- Loading branch information
MacroFake
authored and
jagdeep sidhu
committed
Jun 2, 2022
1 parent
72ad43c
commit 21d3fe6
Showing
4 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2022 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef SYSCOIN_UTIL_DESIGNATOR_H | ||
#define SYSCOIN_UTIL_DESIGNATOR_H | ||
|
||
/** | ||
* Designated initializers can be used to avoid ordering mishaps in aggregate | ||
* initialization. However, they do not prevent uninitialized members. The | ||
* checks can be disabled by defining DISABLE_DESIGNATED_INITIALIZER_ERRORS. | ||
* This should only be needed on MSVC 2019. MSVC 2022 supports them with the | ||
* option "/std:c++20" | ||
*/ | ||
#ifndef DISABLE_DESIGNATED_INITIALIZER_ERRORS | ||
#define Desig(field_name) .field_name = | ||
#else | ||
#define Desig(field_name) | ||
#endif | ||
|
||
#endif // SYSCOIN_UTIL_DESIGNATOR_H |