Skip to content

Remove designated initializers - #818

Open
cameron-craig-etas wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:fix/remove-designated-initializers
Open

cameron-craig-etas wants to merge 1 commit into
eclipse-score:mainfrom
etas-contrib:fix/remove-designated-initializers

Conversation

@cameron-craig-etas

@cameron-craig-etas cameron-craig-etas commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

#683

With the -Wpedantic warning set, we cannot use designated initializers, as they are not part of ISO C++.
This PR removes the designated initializers.

It is a shame we cannot use designated initializers here, they look safer than the alternative, which is an ordinary initializer list. With the ordinary initializer list, we are prone to getting the parameters in the wrong order, which could cause bugs. From a quick look it doesn't look like we have many struct parameters of the same type, so we are not highly exposed to these ordering bugs.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-818: https://eclipse-score.github.io/lifecycle/pr-818/

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — ff3684df Waiting Oct 19, 2026 by cameron-craig-etas via Build and test unit-tests-arm64-qnx / approval #1591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants