Mercurial > octave
diff libinterp/corefcn/__magick_read__.cc @ 29969:7a4f16bff8fd
use fewer OCTAVE_NAMESPACE_BEGIN/END blocks where possible
* __magick_read__.cc, __delaunayn__.cc, __ode15__.cc, __voronoi__.cc:
Place optional header files in separate #ifdef blocks from optional
code so that a single OCTAVE_NAMESPACE_BEGIN/END pair can surround the
entire code section of the file.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 15 Aug 2021 16:57:52 -0400 |
parents | bdf99bc91d94 |
children | b7bce52e4500 |
line wrap: on
line diff
--- a/libinterp/corefcn/__magick_read__.cc Sun Aug 15 15:15:55 2021 -0400 +++ b/libinterp/corefcn/__magick_read__.cc Sun Aug 15 16:57:52 2021 -0400 @@ -39,12 +39,14 @@ #include "errwarn.h" #if defined (HAVE_MAGICK) - -#include <Magick++.h> -#include <clocale> +# include <Magick++.h> +# include <clocale> +#endif OCTAVE_NAMESPACE_BEGIN +#if defined (HAVE_MAGICK) + // In theory, it should be enough to check the class: // Magick::ClassType // PseudoClass: @@ -824,12 +826,8 @@ } } -OCTAVE_NAMESPACE_END - #endif -OCTAVE_NAMESPACE_BEGIN - DEFUN (__magick_read__, args, nargout, doc: /* -*- texinfo -*- @deftypefn {} {[@var{img}, @var{map}, @var{alpha}] =} __magick_read__ (@var{fname}, @var{options}) @@ -954,12 +952,8 @@ %!assert (1) */ -OCTAVE_NAMESPACE_END - #if defined (HAVE_MAGICK) -OCTAVE_NAMESPACE_BEGIN - template <typename T> static uint32NDArray img_float2uint (const T& img) @@ -1485,12 +1479,8 @@ } } -OCTAVE_NAMESPACE_END - #endif -OCTAVE_NAMESPACE_BEGIN - DEFUN (__magick_write__, args, , doc: /* -*- texinfo -*- @deftypefn {} {} __magick_write__ (@var{fname}, @var{fmt}, @var{img}, @var{map}, @var{options}) @@ -1745,12 +1735,8 @@ #endif } -OCTAVE_NAMESPACE_END - #if defined (HAVE_MAGICK) -OCTAVE_NAMESPACE_BEGIN - static octave_value magick_to_octave_value (const Magick::CompressionType& magick) { @@ -1915,12 +1901,8 @@ return; } -OCTAVE_NAMESPACE_END - #endif -OCTAVE_NAMESPACE_BEGIN - DEFUN (__magick_finfo__, args, , doc: /* -*- texinfo -*- @deftypefn {} {} __magick_finfo__ (@var{fname})