Changeset 3362
- Timestamp:
- Nov 25, 2014, 11:41:57 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/omic/BamReadIterator.cc
r3360 r3362 112 112 : Actor(&bf) 113 113 { 114 using boost::shared_ptr; 114 115 #if YAT_HAVE_HTSLIB 115 hts_itr_t* it = sam_itr_queryi(bf.index(), tid, begin, end); 116 iter_ = shared_ptr<hts_itr_t>(sam_itr_queryi(bf.index(), tid, begin, end), 117 IndexDestroyer()); 116 118 #else 117 bam_iter_t it = bam_iter_query(bf.index(), tid, begin, end); 119 iter_ = 120 shared_ptr<__bam_iter_t>(bam_iter_query(bf.index(), tid, begin, end), 121 IndexDestroyer()); 118 122 #endif 119 if (!it ) {123 if (!iter_.get()) { 120 124 std::stringstream ss; 121 125 ss << "BamReadIterator constructor: invalid region: ( tid=" << tid … … 123 127 throw utility::runtime_error(ss.str()); 124 128 } 125 // iter_ takes ownership126 #if YAT_HAVE_HTSLIB127 iter_ = boost::shared_ptr<hts_itr_t>(it, IndexDestroyer());128 #else129 iter_ = boost::shared_ptr<__bam_iter_t>(it, IndexDestroyer());130 #endif131 assert(iter_.get());132 129 } 133 130
Note: See TracChangeset
for help on using the changeset viewer.