~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/util/string.h

  • Committer: Brian Aker
  • Date: 2010-10-26 21:56:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1886.
  • Revision ID: brian@tangent.org-20101026215622-6fcmp520ouj5446p
Update Key to work a bit faster.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
  }
71
71
};
72
72
 
 
73
struct sensitive_hash : std::unary_function< std::vector<char>, std::size_t>
 
74
{
 
75
  std::size_t operator()(std::vector<char> const& x) const
 
76
  {
 
77
    std::size_t seed = 0;
 
78
 
 
79
    for(std::vector<char>::const_iterator it = x.begin(); it != x.end(); ++it)
 
80
    {
 
81
      boost::hash_combine(seed, *it);
 
82
    }
 
83
 
 
84
    return seed;
 
85
  }
 
86
};
 
87
 
73
88
} /* namespace util */
74
89
} /* namespace drizzled */
75
90