Skip to content

Commit 7d5bd27

Browse files
Totto16mgerhold
authored andcommitted
fix clang warnings:
- don't use braced scalar initializers (e.g. { .seed{*Seed} } => {.seed=*seed}
1 parent 8d934db commit 7d5bd27

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/recording.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ struct RecordingReader : public Recording {
139139
return tl::unexpected{ ReadError::Incomplete };
140140
}
141141

142-
return TetrionHeader{ .seed{ *seed }, .starting_level{ *starting_level } };
142+
return TetrionHeader{ .seed = *seed, .starting_level = *starting_level };
143143
}
144144

145145
[[nodiscard]] static ReadResult<Record> read_record_from_file(std::ifstream& file) {
@@ -164,9 +164,9 @@ struct RecordingReader : public Recording {
164164
}
165165

166166
return Record{
167-
.tetrion_index{ *tetrion_index },
168-
.simulation_step_index{ *simulation_step_index },
169-
.event{ static_cast<InputEvent>(*event) }, // todo: validation
167+
.tetrion_index = *tetrion_index,
168+
.simulation_step_index = *simulation_step_index,
169+
.event = static_cast<InputEvent>(*event), // todo: validation
170170
};
171171
}
172172
};

src/tetris_application.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ void TetrisApplication::try_load_settings() try {
144144
assert(tetrion_index < seeds.size());
145145
const auto tetrion_seed = seeds[tetrion_index];
146146
const auto starting_level = starting_level_for_tetrion(tetrion_index);
147-
headers.push_back(Recording::TetrionHeader{ .seed{ tetrion_seed }, .starting_level{ starting_level } });
147+
headers.push_back(Recording::TetrionHeader{ .seed = tetrion_seed, .starting_level = starting_level });
148148
}
149149
return headers;
150150
}

0 commit comments

Comments
 (0)