Skip to content

Commit

Permalink
Fixup 7ca648d
Browse files Browse the repository at this point in the history
is_valid_font_file was only used if CAIRO_HAS_WIN32_FONT was defined, so it was
triggering -Werror=unused-function on some compilers.
  • Loading branch information
Vultraz committed Feb 14, 2018
1 parent ec03dfc commit f4b973b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/font/font_config.cpp
Expand Up @@ -97,6 +97,7 @@ bool add_font_to_fontlist(const config &fonts_config,
return true;
}

#ifdef CAIRO_HAS_WIN32_FONT
bool is_valid_font_file(const std::string& file)
{
static const std::array<std::string, 3> font_exts { ".ttf", ".ttc", ".otf" };
Expand All @@ -109,6 +110,7 @@ bool is_valid_font_file(const std::string& file)

return false;
}
#endif

// Current font family for sanserif and monospace fonts in the game

Expand Down Expand Up @@ -239,7 +241,7 @@ manager::manager()
}
#endif

#if CAIRO_HAS_WIN32_FONT
#ifdef CAIRO_HAS_WIN32_FONT
for(const std::string& path : filesystem::get_binary_paths("fonts")) {
std::vector<std::string> files;
if(filesystem::is_directory(path)) {
Expand All @@ -262,7 +264,7 @@ manager::~manager()
FcConfigAppFontClear(FcConfigGetCurrent());
#endif

#if CAIRO_HAS_WIN32_FONT
#ifdef CAIRO_HAS_WIN32_FONT
for(const std::string& path : filesystem::get_binary_paths("fonts")) {
std::vector<std::string> files;
if(filesystem::is_directory(path))
Expand Down

0 comments on commit f4b973b

Please sign in to comment.