Skip to content

Commit

Permalink
Replace more GenericVector by std::vector for src/ccstruct
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Mar 19, 2021
1 parent abc2297 commit 8ed6dee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ccstruct/fontinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ bool read_spacing_info(TFile *f, FontInfo *fi) {
continue;
}
if (kern_size > 0 &&
(!fs->kerned_unichar_ids.DeSerialize(f) || !fs->kerned_x_gaps.DeSerialize(f))) {
(!fs->kerned_unichar_ids.DeSerialize(f) || !f->DeSerialize(fs->kerned_x_gaps))) {
delete fs;
return false;
}
Expand Down Expand Up @@ -201,7 +201,7 @@ bool write_spacing_info(FILE *f, const FontInfo &fi) {
}
}
if (kern_size > 0 &&
(!fs->kerned_unichar_ids.Serialize(f) || !fs->kerned_x_gaps.Serialize(f))) {
(!fs->kerned_unichar_ids.Serialize(f) || !Serialize(f, fs->kerned_x_gaps))) {
return false;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/ccstruct/fontinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// File: fontinfo.h
// Description: Font information classes abstracted from intproto.h/cpp.
// Author: [email protected] (Ray Smith)
// Created: Tue May 17 17:08:01 PDT 2011
//
// (C) Copyright 2011, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -54,7 +53,7 @@ struct FontSpacingInfo {
int16_t x_gap_before;
int16_t x_gap_after;
GenericVector<UNICHAR_ID> kerned_unichar_ids;
GenericVector<int16_t> kerned_x_gaps;
std::vector<int16_t> kerned_x_gaps;
};

/*
Expand Down

0 comments on commit 8ed6dee

Please sign in to comment.