projects
/
SXSI
/
TextCollection.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small fixes
[SXSI/TextCollection.git]
/
TCImplementation.cpp
diff --git
a/TCImplementation.cpp
b/TCImplementation.cpp
index
723a2b9
..
5a754c7
100644
(file)
--- a/
TCImplementation.cpp
+++ b/
TCImplementation.cpp
@@
-378,16
+378,7
@@
TextCollection::document_result TCImplementation::Prefix(uchar const * pattern)
TextPosition sp = 0, ep = 0;
Search(pattern, m, &sp, &ep);
TextPosition sp = 0, ep = 0;
Search(pattern, m, &sp, &ep);
-
- TextCollection::document_result result;
- // Report end-markers in result interval
- unsigned resultSize = CountEndmarkers(sp, ep);
- if (resultSize == 0)
- return result;
-
- result.reserve(resultSize); // Try to avoid reallocation.
-
// Iterate through end-markers in [sp,ep]:
return EnumerateEndmarkers(sp, ep);
}
// Iterate through end-markers in [sp,ep]:
return EnumerateEndmarkers(sp, ep);
}
@@
-401,15
+392,6
@@
TextCollection::document_result TCImplementation::Prefix(uchar const * pattern,
TextPosition sp = 0, ep = 0;
Search(pattern, m, &sp, &ep);
TextPosition sp = 0, ep = 0;
Search(pattern, m, &sp, &ep);
- TextCollection::document_result result;
-
- // Report end-markers in result interval
- unsigned resultSize = CountEndmarkers(sp, ep);
- if (resultSize == 0)
- return result;
-
- result.reserve(resultSize); // Try to avoid reallocation.
-
// Return end-markers in [sp,ep] and [begin, end]:
return EnumerateEndmarkers(sp, ep, begin, end);
}
// Return end-markers in [sp,ep] and [begin, end]:
return EnumerateEndmarkers(sp, ep, begin, end);
}
@@
-511,8
+493,6
@@
TextCollection::document_result TCImplementation::Equal(uchar const *pattern) co
// Match including end-marker
Search(pattern, m+1, &sp, &ep);
// Match including end-marker
Search(pattern, m+1, &sp, &ep);
- TextCollection::document_result result;
-
// Report end-markers in result interval
return EnumerateEndmarkers(sp, ep);
}
// Report end-markers in result interval
return EnumerateEndmarkers(sp, ep);
}
@@
-527,8
+507,6
@@
TextCollection::document_result TCImplementation::Equal(uchar const *pattern, Do
// Match including end-marker
Search(pattern, m+1, &sp, &ep, begin, end);
// Match including end-marker
Search(pattern, m+1, &sp, &ep, begin, end);
- TextCollection::document_result result;
-
// Report end-markers in result interval
return EnumerateEndmarkers(sp, ep, begin, end);
}
// Report end-markers in result interval
return EnumerateEndmarkers(sp, ep, begin, end);
}
@@
-632,8
+610,6
@@
TextCollection::document_result TCImplementation::LessThan(uchar const * pattern
TextPosition sp = 0, ep = 0;
SearchLessThan(pattern, m, &sp, &ep);
TextPosition sp = 0, ep = 0;
SearchLessThan(pattern, m, &sp, &ep);
- TextCollection::document_result result;
-
// Report end-markers in result interval
return EnumerateEndmarkers(sp, ep);
}
// Report end-markers in result interval
return EnumerateEndmarkers(sp, ep);
}
@@
-647,15
+623,6
@@
TextCollection::document_result TCImplementation::LessThan(uchar const * pattern
TextPosition sp = 0, ep = 0;
SearchLessThan(pattern, m, &sp, &ep);
TextPosition sp = 0, ep = 0;
SearchLessThan(pattern, m, &sp, &ep);
- TextCollection::document_result result;
-
- // Report end-markers in result interval
- unsigned resultSize = CountEndmarkers(sp, ep);
- if (resultSize == 0)
- return result;
-
- result.reserve(resultSize); // Try to avoid reallocation.
-
// Iterate through end-markers in [sp,ep] and [begin, end]:
return EnumerateEndmarkers(sp, ep, begin, end);
}
// Iterate through end-markers in [sp,ep] and [begin, end]:
return EnumerateEndmarkers(sp, ep, begin, end);
}