Skip to content

Commit

Permalink
Fix member initialization ordering warning (#82)
Browse files Browse the repository at this point in the history
'u' was defined before 'tag' but 'tag' is initialized first.

Signed-off-by: Kevin Petit <[email protected]>
  • Loading branch information
kpet authored Nov 29, 2024
1 parent bdcab05 commit dcb4605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hwcpipe/include/hwcpipe/detail/internal_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ struct block_offset {
*/
struct counter_definition {
enum class type { invalid, hardware, expression };
type tag;
union u {
block_offset address{};
expression::expression_definition expression;
Expand All @@ -104,7 +105,6 @@ struct counter_definition {
explicit u(block_offset address)
: address(address) {}
} u;
type tag;

counter_definition()
: tag(type::invalid)
Expand Down

0 comments on commit dcb4605

Please sign in to comment.