diff --git a/PDB/include/CGAL/PDB/range.h b/PDB/include/CGAL/PDB/range.h index 68a3327945f..98fafc12b3f 100644 --- a/PDB/include/CGAL/PDB/range.h +++ b/PDB/include/CGAL/PDB/range.h @@ -178,10 +178,10 @@ make_ca_range(Range r){ } -template -struct Is_ok_bond { +template +struct Filtered_atom_bond_filter { typedef bool result_type; - Is_ok_bond(OK_atom ao): ao_(ao){} + Filtered_atom_bond_filter(Atom_filter ao): ao_(ao){} struct Atom_pair{ Monomer::Atom_key k_; @@ -205,14 +205,14 @@ struct Is_ok_bond { return false; } } - OK_atom ao_; + Atom_filter ao_; }; //! Return an iterator range which returns skips non-backbone atoms - template -internal::rangelib::filtered_range > -make_backbone_range(OKA oka, Range r){ - return internal::rangelib::filtered(r, Is_ok_bond(oka)); + template +internal::rangelib::filtered_range > +make_filtered_bond_range(AtomFilter oka, Range r){ + return internal::rangelib::filtered(r, Filtered_atom_bond_filter(oka)); } diff --git a/PDB/test/PDB/check_iterators.cpp b/PDB/test/PDB/check_iterators.cpp index 4a60524a67e..27301c2efb4 100644 --- a/PDB/test/PDB/check_iterators.cpp +++ b/PDB/test/PDB/check_iterators.cpp @@ -60,7 +60,7 @@ int main() { assert(bbi.size() < atoms.size()); std::cout << bbi.size() << std::endl; std::vector bbs; - fill(bbs, make_bond_indices_range(make_ok_bond_range(Is_backbone(), p.bonds()))); + fill(bbs, make_bond_indices_range(make_filtered_bond_range(Is_backbone(), p.bonds()))); std::cout << bbs.size() << std::endl; for (unsigned int i=0; i< bbs.size(); ++i) { assert(bbs[i].first < Index(bbi.size()));