FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MNT: ensure that variables are always initialized · larsoner/matplotlib@99ccdca · GitHub

Repository navigation

Commit 99ccdca

Browse files
committed
MNT: ensure that variables are always initialized
Fixes an issue found by clang-tidy Aided by 🤖
1 parent b8fb1b4 commit 99ccdca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/ft2font.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ void FT2Font::load_char(long charcode, FT_Int32 flags, FT2Font *&ft_object, bool
527527
ft_object->load_char(charcode, flags, throwaway, false);
528528
} else if (fallback) {
529529
FT_UInt final_glyph_index;
530-
FT_Error charcode_error, glyph_error;
530+
FT_Error charcode_error = FT_Err_Ok, glyph_error = FT_Err_Ok;
531531
FT2Font *ft_object_with_glyph = this;
532532
bool was_found = load_char_with_fallback(ft_object_with_glyph, final_glyph_index,
533533
glyphs, char_to_font,
@@ -595,6 +595,8 @@ bool FT2Font::load_char_with_fallback(FT2Font *&ft_object_with_glyph,
595595
FT_Error &glyph_error,
596596
std::set<FT_String*> &glyph_seen_fonts)
597597
{
598+
charcode_error = FT_Err_Ok;
599+
glyph_error = FT_Err_Ok;
598600
FT_UInt glyph_index = FT_Get_Char_Index(face, charcode);
599601
if (!warn_if_used) {
600602
glyph_seen_fonts.insert(face->family_name);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL