Mercurial > octave
diff libinterp/corefcn/ft-text-renderer.cc @ 31845:2da025d5e98d
maint: Use 's_' prefix for static private class variables.
Use 's_' as prefix for static class variables. Where the static variable
is really a constant, use ALL_CAPITALS for name.
* main-window.cc, main-window.h, ft-text-renderer.cc, interpreter.cc,
interpreter.h, __init_fltk__.cc, ov-base.cc, ov-base.h, ov-class.cc,
ov-class.h, ov-classdef.cc, ov-classdef.h, ov-java.cc, ov-java.h, oct-rand.cc,
oct-rand.h, oct-env.cc, oct-env.h, cmd-edit.cc, cmd-edit.h, oct-inttypes.h:
Use 's_' prefix for static private class variables.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 20 Feb 2023 18:06:54 -0800 |
parents | febd82d1a8de |
children | 05b4479c29d8 |
line wrap: on
line diff
--- a/libinterp/corefcn/ft-text-renderer.cc Sun Feb 19 20:11:39 2023 -0800 +++ b/libinterp/corefcn/ft-text-renderer.cc Mon Feb 20 18:06:54 2023 -0800 @@ -146,9 +146,9 @@ { bool retval = true; - if (! m_instance) + if (! s_instance) { - m_instance = new ft_manager (); + s_instance = new ft_manager (); singleton_cleanup_list::add (cleanup_instance); } @@ -156,28 +156,28 @@ } static void cleanup_instance () - { delete m_instance; m_instance = nullptr; } + { delete s_instance; s_instance = nullptr; } static FT_Face get_font (const std::string& name, const std::string& weight, const std::string& angle, double size, FT_ULong c = 0) { return (instance_ok () - ? m_instance->do_get_font (name, weight, angle, size, c) + ? s_instance->do_get_font (name, weight, angle, size, c) : nullptr); } static octave_map get_system_fonts () { return (instance_ok () - ? m_instance->do_get_system_fonts () + ? s_instance->do_get_system_fonts () : octave_map ()); } static void font_destroyed (FT_Face face) { if (instance_ok ()) - m_instance->do_font_destroyed (face); + s_instance->do_font_destroyed (face); } private: @@ -430,7 +430,7 @@ //-------- - static ft_manager *m_instance; + static ft_manager *s_instance; // Cache the fonts loaded by FreeType. This cache only contains // weak references to the fonts, strong references are only present @@ -442,7 +442,7 @@ bool m_fontconfig_initialized; }; -ft_manager *ft_manager::m_instance = nullptr; +ft_manager *ft_manager::s_instance = nullptr; static void ft_face_destroyed (void *object)