Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ift/table_keyed_diff.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Status TableKeyedDiff::Diff(const FontData& font_base,
flat_hash_set<hb_tag_t> new_tables;
flat_hash_set<hb_tag_t> unchanged_tables;

for (std::string tag : diff_tags) {
for (const std::string& tag : diff_tags) {
hb_tag_t t = HB_TAG(tag[0], tag[1], tag[2], tag[3]);
bool in_base = base_tags.contains(t);
bool in_derived = derived_tags.contains(t);
Expand Down Expand Up @@ -99,7 +99,7 @@ Status TableKeyedDiff::Diff(const FontData& font_base,
// Skip past all of the offsets (there's patchesCount + 1 of them)
uint32_t current_offset = data.size() + (diff_tags.size() + 1) * 4;

for (std::string tag : diff_tags) {
for (const std::string& tag : diff_tags) {
FontHelper::WriteUInt32(current_offset, data);
uint32_t min_size = 9;
current_offset += min_size;
Expand All @@ -112,7 +112,7 @@ Status TableKeyedDiff::Diff(const FontData& font_base,
FontHelper::WriteUInt32(current_offset, data);

// Write out table patches
for (std::string tag : diff_tags) {
for (const std::string& tag : diff_tags) {
hb_tag_t t = HB_TAG(tag[0], tag[1], tag[2], tag[3]);

FontHelper::WriteUInt32(t, data);
Expand Down
Loading