diff options
author | Marius Kintel <marius@kintel.net> | 2011-08-04 02:58:17 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-08-04 02:58:17 (GMT) |
commit | cf4821c589dc5a43895c7ea781f6a916c8b5821c (patch) | |
tree | 5d3cf7a69f39187d2cc9b639cacfb68a812ae467 /src/stl-utils.h | |
parent | e3e31c0f4f1049cb983906cc8fea83ef78611231 (diff) |
De-Qt-ified AbstractNode
Diffstat (limited to 'src/stl-utils.h')
-rw-r--r-- | src/stl-utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/stl-utils.h b/src/stl-utils.h new file mode 100644 index 0000000..a48b7d5 --- /dev/null +++ b/src/stl-utils.h @@ -0,0 +1,19 @@ +#ifndef STLUTILS_H_ +#define STLUTILS_H_ + +template<class T> +struct del_fun_t +{ + del_fun_t& operator()(T* p) { + delete p; + return *this; + } +}; + +template<class T> +del_fun_t<T> del_fun() +{ + return del_fun_t<T>(); +} + +#endif |