~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/util/functors.h

  • Committer: Monty Taylor
  • Date: 2010-12-26 00:22:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226002234-2sb62sm2gs0iftuy
Fixing some of the innodb c++ casting issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#pragma once
 
21
#ifndef DRIZZLED_UTIL_FUNCTORS_H
 
22
#define DRIZZLED_UTIL_FUNCTORS_H
22
23
 
23
24
namespace drizzled
24
25
{
33
34
  }
34
35
};
35
36
 
 
37
class SafeDeletePtr
 
38
{
 
39
public:
 
40
  template<typename T>
 
41
  inline void operator()(const T *ptr) const
 
42
  {
 
43
    if (ptr)
 
44
                        delete ptr;
 
45
  }
 
46
};
 
47
 
36
48
} /* namespace drizzled */
37
49
 
 
50
#endif /* DRIZZLED_UTIL_FUNCTORS_H */