Mercurial > hg > octave-lyh
changeset 7470:ada435261879
eliminate unnecessary explicit template instantiations
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 12 Feb 2008 15:44:42 -0500 |
parents | 360b4f7684fd |
children | 86ba621332ff |
files | liboctave/ChangeLog liboctave/Sparse-C.cc liboctave/Sparse-b.cc liboctave/Sparse-d.cc liboctave/Sparse.h liboctave/sparse-sort.cc |
diffstat | 6 files changed, 8 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,13 @@ 2008-02-12 John W. Eaton <jwe@octave.org> + * sparse-sort.cc: Don't explicitly instantiate + class octave_sort<octave_idx_vector_sort *>, + class octave_sort<octave_idx_type>, or + class octave_sort<octave_sparse_sort_idxl *>. + + * Sparse.h (INSTANTIATE_SPARSE_SORT): Delete macro. + * Sparse-C.cc, Sparse-b.cc, Sparse-d.cc: Don't use it. + * Range.cc (Range::sort_internal): Avoid shadow warning from gcc. 2008-02-11 John W. Eaton <jwe@octave.org>
--- a/liboctave/Sparse-C.cc +++ b/liboctave/Sparse-C.cc @@ -91,8 +91,6 @@ && (arg (a->vec) > arg (b->vec)))); } -INSTANTIATE_SPARSE_SORT (Complex); - INSTANTIATE_SPARSE_AND_ASSIGN (Complex, OCTAVE_API); INSTANTIATE_SPARSE_ASSIGN (Complex, double, OCTAVE_API);
--- a/liboctave/Sparse-b.cc +++ b/liboctave/Sparse-b.cc @@ -31,8 +31,6 @@ #include "Sparse.cc" #include "oct-sort.cc" -INSTANTIATE_SPARSE_SORT (bool); - INSTANTIATE_SPARSE_AND_ASSIGN (bool, OCTAVE_API); #if 0
--- a/liboctave/Sparse-d.cc +++ b/liboctave/Sparse-d.cc @@ -60,8 +60,6 @@ return (xisnan (b->vec) || (a->vec > b->vec)); } -INSTANTIATE_SPARSE_SORT (double); - INSTANTIATE_SPARSE_AND_ASSIGN (double, OCTAVE_API); #if 0
--- a/liboctave/Sparse.h +++ b/liboctave/Sparse.h @@ -546,11 +546,6 @@ INSTANTIATE_SPARSE (T, API); \ INSTANTIATE_SPARSE_ASSIGN (T, T, API) -#define INSTANTIATE_SPARSE_SORT(T) \ - template class octave_sort<T>; \ - template class vec_index<T>; \ - template class octave_sort<vec_index<T> *>; - #endif /*
--- a/liboctave/sparse-sort.cc +++ b/liboctave/sparse-sort.cc @@ -49,9 +49,6 @@ return (i->r < j->r); } -// Instantiate the sparse sorting class -template class octave_sort<octave_sparse_sort_idxl *>; - // Need to know the original order of the sorted indexes in // sparse assignments, and this class does that bool @@ -61,12 +58,6 @@ return (i->i < j->i); } -// Instantiate the sparse index sorting class -template class octave_sort<octave_idx_vector_sort *>; - -// Instantiate the sorting class of octave_idx_type, need in MUL macro -template class octave_sort<octave_idx_type>; - /* ;;; Local Variables: *** ;;; mode: C++ ***