~ubuntu-branches/ubuntu/wily/clucene-core/wily-proposed

« back to all changes in this revision

Viewing changes to src/CLucene/search/ExactPhraseScorer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-02-21 08:43:54 UTC
  • mfrom: (3.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20080221084354-bzl2ied6qgvwwfr8
Tags: 0.9.20-3
* Lower compat/debhelper to 5.
* Re-enable static library build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                CND_PRECONDITION(pq    != NULL,"pq is NULL");
42
42
                CND_PRECONDITION(pq->size()==0,"pq is not empty");
43
43
 
44
 
                //declare iterator
45
 
                PhrasePositions* pp = NULL;
46
 
 
47
44
                //build pq from list
48
45
 
49
46
                //Add the nodes of the list of PhrasePositions and store them
50
47
                //into the PhraseQueue pq so it can used to build
51
48
                //a list of sorted nodes
52
 
                for (pp = first; pp != NULL; pp = pp->_next) {
 
49
                for (PhrasePositions* pp = first; pp != NULL; pp = pp->_next) {
53
50
                        //Read the first TermPosition of the current PhrasePositions pp
54
51
                        pp->firstPosition();
55
52
                        //Store the current PhrasePositions pp into the PhraseQueue pq
56
53
                        pq->put(pp);
57
54
                }
58
 
                //pqToList requires that first and last be NULL when it's called.  In
59
 
                //this case, the nodes of the linked list are referenced by pq (see
 
55
                //pqToList requires that first and last be NULL when it's called.  
 
56
                //This is done at the beginning of pqToList()
 
57
                //In this case, the nodes of the linked list are referenced by pq (see
60
58
                //above loop), so we can clear our pointers to the head and tail of the
61
59
                //linked list without fear of leaking the nodes.
62
 
                first = NULL;
63
 
                last = NULL;
 
60
                
64
61
                //rebuild list from pq
65
62
                pqToList();
66
63