Fix some misleading variable shadowing
Originally committed to SVN as r6575.
This commit is contained in:
parent
29fcf9de44
commit
42b1d4d4eb
3 changed files with 13 additions and 12 deletions
|
@ -86,8 +86,8 @@ void FontCollector::ProcessDialogueLine(AssDialogue *line, int index) {
|
||||||
if (overriden)
|
if (overriden)
|
||||||
used_styles[style].lines.insert(index);
|
used_styles[style].lines.insert(index);
|
||||||
std::set<wxUniChar>& chars = used_styles[style].chars;
|
std::set<wxUniChar>& chars = used_styles[style].chars;
|
||||||
for (size_t i = 0; i < text.size(); ++i)
|
for (size_t j = 0; j < text.size(); ++j)
|
||||||
chars.insert(text[i]);
|
chars.insert(text[j]);
|
||||||
}
|
}
|
||||||
// Do nothing with drawing blocks
|
// Do nothing with drawing blocks
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,7 +157,7 @@ FontFileLister::CollectionResult FontConfigFontFileLister::GetFontPaths(wxString
|
||||||
int cur_font;
|
int cur_font;
|
||||||
for (cur_font = 0; cur_font < fset->nfont; ++cur_font) {
|
for (cur_font = 0; cur_font < fset->nfont; ++cur_font) {
|
||||||
FcBool outline;
|
FcBool outline;
|
||||||
FcResult result = FcPatternGetBool(fset->fonts[cur_font], FC_OUTLINE, 0, &outline);
|
result = FcPatternGetBool(fset->fonts[cur_font], FC_OUTLINE, 0, &outline);
|
||||||
if (result == FcResultMatch && outline) break;
|
if (result == FcResultMatch && outline) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,12 +123,13 @@ FreetypeFontFileLister::FreetypeFontFileLister(FontCollectorStatusCallback Appen
|
||||||
wxArrayString fontfiles;
|
wxArrayString fontfiles;
|
||||||
wxDir::GetAllFiles(get_font_folder(), &fontfiles, "", wxDIR_FILES);
|
wxDir::GetAllFiles(get_font_folder(), &fontfiles, "", wxDIR_FILES);
|
||||||
|
|
||||||
for (size_t i = 0; i < fontfiles.size(); ++i) {
|
for (size_t ff = 0; ff < fontfiles.size(); ++ff) {
|
||||||
if (indexed_files.count(fontfiles[i])) continue;
|
wxString const& fontfile = fontfiles[ff];
|
||||||
|
if (indexed_files.count(fontfile)) continue;
|
||||||
|
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
for (FT_Long i = 0; FT_New_Face(ft2lib, fontfiles[i].mb_str(*wxConvFileName), i, &face) == 0; ++i) {
|
for (FT_Long i = 0; FT_New_Face(ft2lib, fontfile.mb_str(*wxConvFileName), i, &face) == 0; ++i) {
|
||||||
if (get_name_count(fontfiles[i], face) > 0) {
|
if (get_name_count(fontfile, face) > 0) {
|
||||||
std::map<FT_UShort, std::vector<wxString> > names = get_names(face);
|
std::map<FT_UShort, std::vector<wxString> > names = get_names(face);
|
||||||
std::vector<wxString>& family = names[1];
|
std::vector<wxString>& family = names[1];
|
||||||
std::vector<wxString>& style = names[2];
|
std::vector<wxString>& style = names[2];
|
||||||
|
@ -136,18 +137,18 @@ FreetypeFontFileLister::FreetypeFontFileLister(FontCollectorStatusCallback Appen
|
||||||
|
|
||||||
for (size_t j = 0; j < family.size() && j < style.size(); ++j) {
|
for (size_t j = 0; j < family.size() && j < style.size(); ++j) {
|
||||||
if (style[j] != "Regular")
|
if (style[j] != "Regular")
|
||||||
AddFont(fontfiles[i], family[j], style[j]);
|
AddFont(fontfile, family[j], style[j]);
|
||||||
else
|
else
|
||||||
AddFont(fontfiles[i], family[j]);
|
AddFont(fontfile, family[j]);
|
||||||
}
|
}
|
||||||
for (size_t j = 0; j < full_name.size(); ++j)
|
for (size_t j = 0; j < full_name.size(); ++j)
|
||||||
AddFont(fontfiles[i], full_name[j]);
|
AddFont(fontfile, full_name[j]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (face->style_name)
|
if (face->style_name)
|
||||||
AddFont(fontfiles[i], face->family_name, face->style_name);
|
AddFont(fontfile, face->family_name, face->style_name);
|
||||||
else
|
else
|
||||||
AddFont(fontfiles[i], wxString(face->family_name));
|
AddFont(fontfile, wxString(face->family_name));
|
||||||
}
|
}
|
||||||
FT_Done_Face(face);
|
FT_Done_Face(face);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue