diff libinterp/corefcn/ft-text-renderer.cc @ 22869:f75d289645ec

make deleted functions public * octave-gui.h, resource-manager.h, shortcut-manager.h, base-text-renderer.h, c-file-ptr-stream.h, dynamic-ld.cc, dynamic-ld.h, event-queue.h, ft-text-renderer.cc, gl-render.cc, gl-render.h, graphics.cc, graphics.in.h, interpreter.h, mex.cc, mxarray.in.h, oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-procbuf.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h, octave-link.h, pager.h, profiler.h, sighandlers.cc, symtab.h, text-renderer.h, zfstream.h, __init_fltk__.cc, ov-builtin.h, ov-dld-fcn.h, ov-fcn.h, ov-mex-fcn.h, ov-typeinfo.h, ov-usr-fcn.h, octave.h, lex.h, parse.h, pt-arg-list.h, pt-array-list.h, pt-assign.h, pt-binop.h, pt-bp.h, pt-cell.h, pt-check.h, pt-classdef.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.h, pt-eval.h, pt-except.h, pt-exp.h, pt-fcn-handle.h, pt-funcall.h, pt-id.h, pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h, pt-select.h, pt-stmt.h, pt-unop.h, pt-walk.h, pt.h, token.h, Array.cc, idx-vector.h, oct-fftw.h, sparse-chol.cc, sparse-qr.cc, file-ops.h, mach-info.h, oct-env.h, action-container.h, cmd-edit.cc, cmd-edit.h, cmd-hist.h, oct-locbuf.h, oct-mutex.h, oct-shlib.cc, oct-sort.h, pathsearch.h, singleton-cleanup.h, unwind-prot.h, url-transfer.cc, url-transfer.h: Declare deleted copy constructors and assignment operators public.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2016 12:40:45 -0500
parents 87e3163f6c87
children ef4d915df748
line wrap: on
line diff
--- a/libinterp/corefcn/ft-text-renderer.cc	Tue Dec 06 10:59:29 2016 -0500
+++ b/libinterp/corefcn/ft-text-renderer.cc	Tue Dec 06 12:40:45 2016 -0500
@@ -92,7 +92,51 @@
   class
   ft_manager
   {
+  private:
+
+    ft_manager (void)
+      : library (), freetype_initialized (false), fontconfig_initialized (false)
+    {
+      if (FT_Init_FreeType (&library))
+        error ("unable to initialize FreeType library");
+      else
+        freetype_initialized = true;
+
+#if defined (HAVE_FONTCONFIG)
+      if (! FcInit ())
+        error ("unable to initialize fontconfig library");
+      else
+        fontconfig_initialized = true;
+#endif
+    }
+
   public:
+
+    // No copying!
+
+    ft_manager (const ft_manager&) = delete;
+
+    ft_manager& operator = (const ft_manager&) = delete;
+
+  private:
+
+    ~ft_manager (void)
+    {
+      if (freetype_initialized)
+        FT_Done_FreeType (library);
+
+#if defined (HAVE_FONTCONFIG)
+      // FIXME: Skip the call to FcFini because it can trigger the assertion
+      //
+      //   octave: fccache.c:507: FcCacheFini: Assertion 'fcCacheChains[i] == ((void *)0)' failed.
+      //
+      // if (fontconfig_initialized)
+      //   FcFini ();
+#endif
+    }
+
+  public:
+
     static bool instance_ok (void)
     {
       bool retval = true;
@@ -139,45 +183,6 @@
     // in class text_renderer.
     ft_cache cache;
 
-  private:
-
-    // No copying!
-
-    ft_manager (const ft_manager&) = delete;
-
-    ft_manager& operator = (const ft_manager&) = delete;
-
-    ft_manager (void)
-      : library (), freetype_initialized (false), fontconfig_initialized (false)
-    {
-      if (FT_Init_FreeType (&library))
-        error ("unable to initialize FreeType library");
-      else
-        freetype_initialized = true;
-
-#if defined (HAVE_FONTCONFIG)
-      if (! FcInit ())
-        error ("unable to initialize fontconfig library");
-      else
-        fontconfig_initialized = true;
-#endif
-    }
-
-    ~ft_manager (void)
-    {
-      if (freetype_initialized)
-        FT_Done_FreeType (library);
-
-#if defined (HAVE_FONTCONFIG)
-      // FIXME: Skip the call to FcFini because it can trigger the assertion
-      //
-      //   octave: fccache.c:507: FcCacheFini: Assertion 'fcCacheChains[i] == ((void *)0)' failed.
-      //
-      // if (fontconfig_initialized)
-      //   FcFini ();
-#endif
-    }
-
     FT_Face do_get_font (const std::string& name, const std::string& weight,
                          const std::string& angle, double size)
     {
@@ -351,6 +356,12 @@
         color (dim_vector (1, 3), 0)
     { }
 
+    // No copying!
+
+    ft_text_renderer (const ft_text_renderer&) = delete;
+
+    ft_text_renderer& operator = (const ft_text_renderer&) = delete;
+
     ~ft_text_renderer (void) = default;
 
     void visit (text_element_string& e);
@@ -403,12 +414,6 @@
 
     int rotation_to_mode (double rotation) const;
 
-    // No copying!
-
-    ft_text_renderer (const ft_text_renderer&) = delete;
-
-    ft_text_renderer& operator = (const ft_text_renderer&) = delete;
-
     // Class to hold information about fonts and a strong
     // reference to the font objects loaded by FreeType.