From 9db8f89e9dbf9e1d61a12d0e6094c4db0b7111e4 Mon Sep 17 00:00:00 2001 From: nvalimak Date: Fri, 27 Mar 2009 15:48:17 +0000 Subject: [PATCH] Small fixes git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/TextCollection@298 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- TCImplementation.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/TCImplementation.cpp b/TCImplementation.cpp index 723a2b9..5a754c7 100644 --- 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); - - 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); } @@ -401,15 +392,6 @@ TextCollection::document_result TCImplementation::Prefix(uchar const * pattern, 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); } @@ -511,8 +493,6 @@ TextCollection::document_result TCImplementation::Equal(uchar const *pattern) co // Match including end-marker Search(pattern, m+1, &sp, &ep); - TextCollection::document_result result; - // 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); - TextCollection::document_result result; - // 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); - TextCollection::document_result result; - // 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); - 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); } -- 2.17.1