Skip to content

Commit 90028f2

Browse files
committed
Downgrade gcovr to 5.0 for now
gcovr/gcovr#587
1 parent 37674aa commit 90028f2

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117

118118
cppcheck: true
119119

120-
gcovr: true
120+
gcovr: 5.0
121121
opencppcoverage: true
122122

123123
- name: Cleanup Conan system packages (they are not properly cached)

src/game_components.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Game_Map load_tiled_map(const std::filesystem::path &map_json, const std::vector
2424
for (const auto &search_path : search_paths) {
2525
spdlog::debug("Trying search path '{}'", search_path.string());
2626
const auto path = search_path / map_json;
27-
if (std::error_code ec; std::filesystem::is_regular_file(path, ec)) { return load_tiled_map(path); }
27+
if (std::error_code error; std::filesystem::is_regular_file(path, error)) { return load_tiled_map(path); }
2828
}
2929

3030
throw std::runtime_error(fmt::format("Unable to find map in any search path: {}", map_json.string()));
@@ -62,7 +62,7 @@ Game_Map load_tiled_map(const std::filesystem::path &map_json)// NOLINT cognitiv
6262
result.emplace_back(parent_path / tsj_image_path, tile_size, start_gid);
6363

6464
for (const auto &tile : tsj["tiles"]) {
65-
std::size_t id = tile["id"];
65+
std::size_t tile_id = tile["id"];
6666

6767
bool passable = true;
6868

@@ -73,7 +73,7 @@ Game_Map load_tiled_map(const std::filesystem::path &map_json)// NOLINT cognitiv
7373
}
7474
}
7575

76-
result.back().properties[start_gid + id] = Tile_Set::Tile_Properties{ .passable = passable };
76+
result.back().properties[start_gid + tile_id] = Tile_Set::Tile_Properties{ .passable = passable };
7777
}
7878
}
7979
return result;
@@ -111,19 +111,19 @@ Game_Map load_tiled_map(const std::filesystem::path &map_json)// NOLINT cognitiv
111111
}
112112
}
113113

114-
std::size_t x = 0;
115-
std::size_t y = 0;
114+
std::size_t cur_x = 0;
115+
std::size_t cur_y = 0;
116116
for (const auto &tile : layer["data"]) {
117117

118118
std::size_t tileid = tile;
119119

120-
points[Point{ x, y }].push_back(
120+
points[Point{ cur_x, cur_y }].push_back(
121121
Layer_Info{ .tileid = tileid, .background = background, .foreground = foreground });
122122

123-
++x;
124-
if (x == width) {
125-
x = 0;
126-
++y;
123+
++cur_x;
124+
if (cur_x == width) {
125+
cur_x = 0;
126+
++cur_y;
127127
}
128128
}
129129
}
@@ -140,9 +140,9 @@ Game_Map load_tiled_map(const std::filesystem::path &map_json)// NOLINT cognitiv
140140

141141
if ((layer == Layer::Background && !tile.foreground) || (layer == Layer::Foreground && tile.foreground)) {
142142
const auto &tile_pixels = tile_sets[0].at(tile.tileid);
143-
for (std::size_t y = 0; y < pixels.size().height; ++y) {
144-
for (std::size_t x = 0; x < pixels.size().width; ++x) {
145-
Point current_pixel{ x, y };
143+
for (std::size_t cur_y = 0; cur_y < pixels.size().height; ++cur_y) {
144+
for (std::size_t cur_x = 0; cur_x < pixels.size().width; ++cur_x) {
145+
Point current_pixel{ cur_x, cur_y };
146146

147147
if (first_tile && !tile.foreground) {
148148
pixels.at(current_pixel) = tile_pixels.at(current_pixel);

src/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ ftxui::ButtonOption Animated(ftxui::Color background,// NOLINT
9999
ftxui::Color foreground_active)// NOLINT
100100
{
101101
ftxui::ButtonOption option;
102-
option.transform = [](const ftxui::EntryState &s) {
103-
auto element = ftxui::text(s.label);
104-
if (s.focused) { element |= ftxui::bold; }
102+
option.transform = [](const ftxui::EntryState &state) {
103+
auto element = ftxui::text(state.label);
104+
if (state.focused) { element |= ftxui::bold; }
105105
return element;
106106
};
107107
option.animated_colors.foreground.Set(foreground, foreground_active);
@@ -335,16 +335,16 @@ void play_game(Game &game, std::shared_ptr<log_sink<std::mutex>> log_sink)// NOL
335335
ftxui::Elements paragraphs;
336336

337337
std::string paragraph;
338-
for (const auto c : game.popup_message) {
339-
if (c == '\n') {
338+
for (const auto character : game.popup_message) {
339+
if (character == '\n') {
340340
if (paragraph.empty()) {
341341
paragraphs.push_back(ftxui::separatorEmpty());
342342
} else {
343343
paragraphs.emplace_back(ftxui::paragraphAlignLeft(paragraph));
344344
paragraph.clear();
345345
}
346346
} else {
347-
paragraph.push_back(c);
347+
paragraph.push_back(character);
348348
}
349349
}
350350

0 commit comments

Comments
 (0)