ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Search/Ranker.cpp
(Generate patch)

Comparing trunk/Search/Ranker.cpp (file contents):
Revision 354 by Douglas Thrift, 2004-05-27T00:18:04-07:00 vs.
Revision 355 by Douglas Thrift, 2004-06-04T04:08:28-07:00

# Line 298 | Line 298 | void Ranker::setSample()
298                  }
299          }
300  
301 <        if (sample == "")
301 >        if (sample.empty())
302          {
303                  for (end = sampleMax; end > 0 && (end + 1 < getText().length()); end--)
304                  {
# Line 316 | Line 316 | void Ranker::setSample()
316                  {
317                          sample += " <strong>...</strong>";
318                  }
319 <                else if (sample == "")
319 >                else if (sample.empty())
320                  {
321                          sample = "<strong>...</strong>";
322                  }
# Line 454 | Line 454 | void Ranker::rank()
454   {
455          lowerAddress = tolower(getAddress());
456  
457 <        if (site == "" || lowerAddress.rfind(site) == lowerAddress.length() -
457 >        if (site.empty() || lowerAddress.rfind(site) == lowerAddress.length() -
458                  site.length())
459          {
460                  bool isRequired(required.size() > 0), isExcluded(excluded.size() > 0),
# Line 889 | Line 889 | unsigned Ranker::find(string word, const
889  
890          decrap(word);
891  
892 <        if (word == "")
892 >        if (word.empty())
893          {
894                  // this can happen if a word is all crap characters
895                  value++;
# Line 937 | Line 937 | unsigned Ranker::find(string word, const
937  
938          decrap(word);
939  
940 <        if (word == "")
940 >        if (word.empty())
941          {
942                  // this can happen if a word is all crap characters
943                  value++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines