Mercurial > octave
diff libinterp/corefcn/ft-text-renderer.cc @ 24722:af6c1ed60581
avoid splitting namespace blocks unnecessarily
* fcn-info.cc, ft-text-renderer.cc, gl-render.cc, gl2ps-print.cc,
oct-stream.cc, symtab.cc, pt-cbinop.cc, pt-eval.cc, pt-idx.cc:
Don't split namespace blocks unnecessarily. Omitting static functions
from namespace blocks was done because of a misunderstanding.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 10 Feb 2018 07:58:25 -0500 |
parents | 194eb4bd202b |
children | 1a46d174a483 |
line wrap: on
line diff
--- a/libinterp/corefcn/ft-text-renderer.cc Sat Feb 10 06:37:16 2018 -0500 +++ b/libinterp/corefcn/ft-text-renderer.cc Sat Feb 10 07:58:25 2018 -0500 @@ -61,38 +61,38 @@ #include "pr-output.h" #include "text-renderer.h" -// FIXME: maybe issue at most one warning per glyph/font/size/weight -// combination. - -static void -warn_missing_glyph (FT_ULong c) +namespace octave { - warning_with_id ("Octave:missing-glyph", - "text_renderer: skipping missing glyph for character '%x'", c); -} + // FIXME: maybe issue at most one warning per glyph/font/size/weight + // combination. -static void -warn_glyph_render (FT_ULong c) -{ - warning_with_id ("Octave:glyph-render", - "text_renderer: unable to render glyph for character '%x'", c); -} + static void + warn_missing_glyph (FT_ULong c) + { + warning_with_id ("Octave:missing-glyph", + "text_renderer: skipping missing glyph for character '%x'", c); + } + + static void + warn_glyph_render (FT_ULong c) + { + warning_with_id ("Octave:glyph-render", + "text_renderer: unable to render glyph for character '%x'", c); + } #if defined (_MSC_VER) -// FIXME: is this really needed? -// -// This is just a trick to avoid multiple symbol definitions. -// PermMatrix.h contains a dllexport'ed Array<octave_idx_type> -// that will cause MSVC not to generate a new instantiation and -// use the imported one instead. + // FIXME: is this really needed? + // + // This is just a trick to avoid multiple symbol definitions. + // PermMatrix.h contains a dllexport'ed Array<octave_idx_type> + // that will cause MSVC not to generate a new instantiation and + // use the imported one instead. # include "PermMatrix.h" #endif -// Forward declaration -static void ft_face_destroyed (void *object); + // Forward declaration + static void ft_face_destroyed (void *object); -namespace octave -{ class ft_manager { @@ -341,16 +341,12 @@ ft_manager *ft_manager::instance = nullptr; -} + static void + ft_face_destroyed (void *object) + { + octave::ft_manager::font_destroyed (reinterpret_cast<FT_Face> (object)); + } -static void -ft_face_destroyed (void *object) -{ - octave::ft_manager::font_destroyed (reinterpret_cast<FT_Face> (object)); -} - -namespace octave -{ class OCTINTERP_API ft_text_renderer : public base_text_renderer