Skip to content

Commit 45a60de

Browse files
committed
Fixing build
1 parent db8d6a1 commit 45a60de

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/lib/dplcfile.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ dplc_file::dplc_file(istream& input, int const version) {
6666
}
6767
}
6868

69-
void dplc_file::write(ostream& output, int const version, bool const null_first) const {
69+
void dplc_file::write(
70+
ostream& output, int const version, bool const null_first) const {
7071
map<frame_dplc, size_t> map_to_pos;
7172
map<size_t, frame_dplc> pos_to_map;
7273

@@ -78,7 +79,8 @@ void dplc_file::write(ostream& output, int const version, bool const null_first)
7879
pos_to_map.emplace(0, frames.front());
7980
}
8081
for (auto const& frame : frames) {
81-
if (auto const found = map_to_pos.find(frame); found != map_to_pos.end()) {
82+
if (auto const found = map_to_pos.find(frame);
83+
found != map_to_pos.end()) {
8284
BigEndian::Write2(output, found->second);
8385
} else {
8486
map_to_pos.emplace(frame, size);
@@ -88,10 +90,11 @@ void dplc_file::write(ostream& output, int const version, bool const null_first)
8890
}
8991
}
9092
for (auto const& [position, dplc] : pos_to_map) {
91-
if (position == size_t(output.tellp())) {
93+
auto const fpos = static_cast<size_t>(output.tellp());
94+
if (position == fpos) {
9295
dplc.write(output, version);
9396
} else if (position != 0U) {
94-
fmt::print(stderr, "Missed write at {}\n", output.tellp());
97+
fmt::print(stderr, "Missed write at {}\n", fpos);
9598
dplc.print();
9699
}
97100
}

src/lib/mappingfile.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ void mapping_file::write(
8787
}
8888
}
8989
for (auto const& [pos, maps] : pos_to_map) {
90-
if (pos == size_t(output.tellp())) {
90+
auto const fpos = static_cast<size_t>(output.tellp());
91+
if (pos == fpos) {
9192
maps.write(output, version);
9293
} else if (pos != 0U) {
93-
fmt::print(stderr, "Missed write at {}\n", output.tellp());
94+
fmt::print(stderr, "Missed write at {}\n", fpos);
9495
maps.print();
9596
}
9697
}

0 commit comments

Comments
 (0)