~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/util/functors.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-29 12:04:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110329120436-vozkuer8vqgh027p
Always call assert()

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
 
#ifndef DRIZZLED_UTIL_FUNCTORS_H
22
 
#define DRIZZLED_UTIL_FUNCTORS_H
 
21
#pragma once
23
22
 
24
23
namespace drizzled
25
24
{
34
33
  }
35
34
};
36
35
 
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
 
 
48
36
} /* namespace drizzled */
49
37
 
50
 
#endif /* DRIZZLED_UTIL_FUNCTORS_H */