71 auto it=m_mappingNewToOld.lower_bound(newOffset);
75 unsigned int prevOffset(0);
76 unsigned int prevOffsetMapping(0);
77 if (it!=m_mappingNewToOld.begin()) {
78 if (it==m_mappingNewToOld.end()) {
79 prevOffset=m_mappingNewToOld.rbegin()->first;
80 prevOffsetMapping=m_mappingNewToOld.rbegin()->second;
83 if ((*it).first != newOffset) {
87 prevOffset=(*it).first;
88 prevOffsetMapping=(*it).second;
95 LDEBUG <<
"OffsetMapping::getOriginalOffset" << newOffset <<
"->" << prevOffsetMapping <<
"+" << newOffset <<
"-" << prevOffset;
96 return (prevOffsetMapping + newOffset-prevOffset);
103 if (m_mappingOldToNew.size()==0) {
106 newOffsets.push_back(prevOffset);
109 auto it=m_mappingOldToNew.upper_bound(prevOffset);
113 if (it!=m_mappingNewToOld.begin()) {
115 unsigned int newOffset=(*it).first;
116 while (it!=m_mappingOldToNew.begin() && (*it).first==newOffset) {
118 newOffsets.insert(newOffsets.begin(),(*it).second+prevOffset-newOffset);
124 newOffsets.push_back(prevOffset);