Mercurial > jwe > octave
comparison libinterp/dldfcn/__magick_read__.cc @ 21139:538b57866b90
consistently use "typename" intead of "class" in template declarations
* Object.h, QtHandlesUtils.cc, QtHandlesUtils.h, ToolBarButton.cc,
ToolBarButton.h, Cell.h, __lin_interpn__.cc, bitfcns.cc, bsxfun.cc,
cellfun.cc, data.cc, filter.cc, gcd.cc, graphics.cc, help.cc, kron.cc,
lookup.cc, ls-mat5.cc, ls-oct-text.h, lu.cc, max.cc, mgorth.cc,
oct-map.cc, oct-map.h, oct-stream.cc, oct-stream.h, octave-link.h,
pr-output.cc, profiler.h, schur.cc, sparse-xdiv.cc, sparse-xpow.cc,
sqrtm.cc, symtab.h, tril.cc, typecast.cc, variables.cc, xdiv.cc,
zfstream.h, __init_fltk__.cc, __magick_read__.cc, chol.cc, qr.cc,
ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc, ov-base-int.h,
ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc, ov-base-scalar.h,
ov-base-sparse.cc, ov-base-sparse.h, ov-base.h, ov-classdef.cc,
ov-int-traits.h, ov-java.h, ov-usr-fcn.h, ov.cc, ov.h,
op-dms-template.cc, oct-parse.in.yy, parse.h, pt-mat.cc, Array-b.cc,
Array.cc, Array.h, CDiagMatrix.h, CMatrix.h, CNDArray.h,
DiagArray2.cc, DiagArray2.h, MArray.cc, MArray.h, MDiagArray2.cc,
MDiagArray2.h, MSparse.cc, MSparse.h, MatrixType.cc, Sparse.cc,
Sparse.h, dDiagMatrix.h, dMatrix.h, dNDArray.h, fCDiagMatrix.h,
fCMatrix.h, fCNDArray.h, fDiagMatrix.h, fMatrix.h, fNDArray.h,
idx-vector.cc, idx-vector.h, intNDArray.cc, intNDArray.h, DET.h,
base-aepbal.h, base-lu.cc, base-lu.h, base-qr.cc, base-qr.h,
bsxfun-defs.cc, eigs-base.cc, lo-mappers.h, lo-specfun.cc,
lo-specfun.h, oct-convn.cc, oct-fftw.cc, oct-norm.cc,
sparse-base-chol.cc, sparse-base-chol.h, sparse-base-lu.cc,
sparse-base-lu.h, sparse-dmsolve.cc, mx-inlines.cc,
action-container.h, base-list.h, lo-traits.h, lo-utils.h,
oct-base64.h, oct-binmap.h, oct-cmplx.h, oct-inttypes.cc,
oct-inttypes.h, oct-locbuf.h, oct-refcount.h, oct-sort.cc, oct-sort.h:
Use "typename" instead of "class" in template declarations.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 24 Jan 2016 13:50:04 -0500 |
parents | e39e05d90788 |
children | 76e0ef020dae |
comparison
equal
deleted
inserted
replaced
21138:e2fca7d79169 | 21139:538b57866b90 |
---|---|
207 maps(0) = cmap; | 207 maps(0) = cmap; |
208 maps(1) = amap; | 208 maps(1) = amap; |
209 return maps; | 209 return maps; |
210 } | 210 } |
211 | 211 |
212 template <class T> | 212 template <typename T> |
213 static octave_value_list | 213 static octave_value_list |
214 read_indexed_images (const std::vector<Magick::Image>& imvec, | 214 read_indexed_images (const std::vector<Magick::Image>& imvec, |
215 const Array<octave_idx_type>& frameidx, | 215 const Array<octave_idx_type>& frameidx, |
216 const octave_idx_type& nargout, | 216 const octave_idx_type& nargout, |
217 const octave_scalar_map& options) | 217 const octave_scalar_map& options) |
302 | 302 |
303 // This function is highly repetitive, a bunch of for loops that are | 303 // This function is highly repetitive, a bunch of for loops that are |
304 // very similar to account for different image types. They are different | 304 // very similar to account for different image types. They are different |
305 // enough that trying to reduce the copy and paste would decrease its | 305 // enough that trying to reduce the copy and paste would decrease its |
306 // readability too much. | 306 // readability too much. |
307 template <class T> | 307 template <typename T> |
308 octave_value_list | 308 octave_value_list |
309 read_images (std::vector<Magick::Image>& imvec, | 309 read_images (std::vector<Magick::Image>& imvec, |
310 const Array<octave_idx_type>& frameidx, | 310 const Array<octave_idx_type>& frameidx, |
311 const octave_idx_type& nargout, | 311 const octave_idx_type& nargout, |
312 const octave_scalar_map& options) | 312 const octave_scalar_map& options) |
858 %!assert (1) | 858 %!assert (1) |
859 */ | 859 */ |
860 | 860 |
861 #ifdef HAVE_MAGICK | 861 #ifdef HAVE_MAGICK |
862 | 862 |
863 template <class T> | 863 template <typename T> |
864 static uint32NDArray | 864 static uint32NDArray |
865 img_float2uint (const T& img) | 865 img_float2uint (const T& img) |
866 { | 866 { |
867 typedef typename T::element_type P; | 867 typedef typename T::element_type P; |
868 uint32NDArray out (img.dims ()); | 868 uint32NDArray out (img.dims ()); |
878 return out; | 878 return out; |
879 } | 879 } |
880 | 880 |
881 // Gets the bitdepth to be used for an Octave class, i.e, returns 8 for | 881 // Gets the bitdepth to be used for an Octave class, i.e, returns 8 for |
882 // uint8, 16 for uint16, and 32 for uint32 | 882 // uint8, 16 for uint16, and 32 for uint32 |
883 template <class T> | 883 template <typename T> |
884 static octave_idx_type | 884 static octave_idx_type |
885 bitdepth_from_class () | 885 bitdepth_from_class () |
886 { | 886 { |
887 typedef typename T::element_type P; | 887 typedef typename T::element_type P; |
888 const octave_idx_type bitdepth = | 888 const octave_idx_type bitdepth = |
919 } | 919 } |
920 | 920 |
921 return img; | 921 return img; |
922 } | 922 } |
923 | 923 |
924 template <class T> | 924 template <typename T> |
925 static void | 925 static void |
926 encode_indexed_images (std::vector<Magick::Image>& imvec, | 926 encode_indexed_images (std::vector<Magick::Image>& imvec, |
927 const T& img, | 927 const T& img, |
928 const Matrix& cmap) | 928 const Matrix& cmap) |
929 { | 929 { |
1035 m_img.type (Magick::BilevelType); | 1035 m_img.type (Magick::BilevelType); |
1036 imvec.push_back (m_img); | 1036 imvec.push_back (m_img); |
1037 } | 1037 } |
1038 } | 1038 } |
1039 | 1039 |
1040 template <class T> | 1040 template <typename T> |
1041 static void | 1041 static void |
1042 encode_uint_image (std::vector<Magick::Image>& imvec, | 1042 encode_uint_image (std::vector<Magick::Image>& imvec, |
1043 const T& img, const T& alpha) | 1043 const T& img, const T& alpha) |
1044 { | 1044 { |
1045 typedef typename T::element_type P; | 1045 typedef typename T::element_type P; |