~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/function.cc

  • Committer: Brian Aker
  • Date: 2011-02-27 02:10:05 UTC
  • mto: This revision was merged to the branch mainline in revision 2204.
  • Revision ID: brian@tangent.org-20110227021005-02fb3304yhyt1hiv
Remove caller convert to std::string (ie we were going back and forth in
creation).

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
  std::pair<UdfMap::iterator, bool> ret=
61
61
    udf_registry.insert(make_pair(udf->getName(), udf));
 
62
 
62
63
  if (ret.second == false)
63
64
  {
64
65
    errmsg_printf(error::ERROR,
75
76
  udf_registry.erase(udf->getName());
76
77
}
77
78
 
78
 
const plugin::Function *plugin::Function::get(const char *name, size_t length)
 
79
const plugin::Function *plugin::Function::get(const std::string &name)
79
80
{
80
 
  UdfMap::iterator iter= udf_registry.find(std::string(name, length));
 
81
  UdfMap::iterator iter= udf_registry.find(name);
81
82
  if (iter == udf_registry.end())
82
83
  {
83
84
    return NULL;