mirror of
https://github.com/rui314/mold.git
synced 2024-12-28 19:04:27 +03:00
temporary
This commit is contained in:
parent
c47d549f53
commit
9d41800b20
4
mold.h
4
mold.h
@ -121,8 +121,8 @@ public:
|
||||
return const_cast<ValueT *>(&acc->second);
|
||||
}
|
||||
|
||||
void for_each_value(std::function<void(ValueT &)> fn) {
|
||||
for (typename MapT::iterator it = map.begin(); it != map.end(); ++it)
|
||||
void for_each_value(std::function<void(const ValueT &)> fn) {
|
||||
for (typename MapT::const_iterator it = map.begin(); it != map.end(); ++it)
|
||||
fn(it->second);
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ MergedSection::get_instance(std::string_view name, u32 type, u64 flags) {
|
||||
void MergedSection::copy_buf() {
|
||||
u8 *base = out::buf + shdr.sh_offset;
|
||||
|
||||
map.for_each_value([&](StringPiece &piece) {
|
||||
map.for_each_value([&](const StringPiece &piece) {
|
||||
if (MergeableSection *m = piece.isec)
|
||||
memcpy(base + m->offset + piece.output_offset, piece.data, piece.size);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user