Fix a few missing std::string (du to removal of using namespace std in libcds)
authorkim <kim@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Fri, 30 Apr 2010 02:04:47 +0000 (02:04 +0000)
committerkim <kim@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Fri, 30 Apr 2010 02:04:47 +0000 (02:04 +0000)
git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/TextCollection@823 3cdefd35-fc62-479d-8e8d-bae585ffb9ca

TCImplementation.cpp
TCImplementation.h
TextCollection.cpp

index 4df5c69..130b1a2 100644 (file)
@@ -36,7 +36,7 @@ using std::vector;
 using std::pair;
 using std::make_pair;
 using std::map;
-
+using std::string;
 namespace SXSI
 {
 
index e8e8c4b..ff5f713 100644 (file)
@@ -173,7 +173,7 @@ private:
     // Following methods are not part of the public API
     uchar * BWT(uchar *);
     void makewavelet(uchar *);
-    void maketables(ulong, char, CSA::DeltaVector &, const string &);
+    void maketables(ulong, char, CSA::DeltaVector &, const std::string &);
     DocId DocIdAtTextPos(BlockArray*, TextPosition) const;
     ulong Search(uchar const *, TextPosition, TextPosition *, TextPosition *) const;
     ulong Search(uchar const *, TextPosition, TextPosition *, TextPosition *, DocId, DocId) const;
@@ -330,14 +330,14 @@ private:
                 // Rank among the end-markers in BWT
                 unsigned endmarkerRank = tmp_rank_c-1; //alphabetrank->rank(0, i) - 1;
                 DocId docId = Doc->access(endmarkerRank);
-                result.push_back(make_pair(docId, dist)); 
+                result.push_back(std::make_pair(docId, dist)); 
             }
             else
             {
                 TextPosition textPos = (*suffixes)[sampled->rank1(i)-1] + dist;
                 DocId docId = (*suffixDocId)[sampled->rank1(i)-1];
 
-                result.push_back(make_pair(docId, textPos));
+                result.push_back(std::make_pair(docId, textPos));
             }
         }
     }
@@ -366,7 +366,7 @@ private:
                 unsigned endmarkerRank = tmp_rank_c-1; //alphabetrank->rank(0, i) - 1;
                 DocId docId = Doc->access(endmarkerRank);
                 if (docId >= begin && docId <= end)
-                    result.push_back(make_pair(docId, dist)); 
+                 result.push_back(std::make_pair(docId, dist)); 
             }
             else
             {
@@ -374,7 +374,7 @@ private:
                 DocId docId = (*suffixDocId)[sampled->rank1(i)-1];
 
                 if (docId >= begin && docId <= end)
-                    result.push_back(make_pair(docId, textPos));
+                 result.push_back(std::make_pair(docId, textPos));
             }
         }
     }
index 9c94724..d099a3c 100644 (file)
@@ -3,6 +3,7 @@
 
 namespace SXSI
 {
+
     /**
      * Init text collection from a file
      *