diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-02-26 16:23:37 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-02-26 16:23:37 -0800 |
| commit | 4d03e4b711c8aadb829ce8b26237c917ee04bbb7 (patch) | |
| tree | 0bf1ac952b1739afbc50e9062ccf14fb183e3af3 /src | |
| parent | c28c258f915f0ab46a51519a2b79bd42af383891 (diff) | |
| download | rust-4d03e4b711c8aadb829ce8b26237c917ee04bbb7.tar.gz rust-4d03e4b711c8aadb829ce8b26237c917ee04bbb7.zip | |
rt: Remove smart_ptr. Unused
Diffstat (limited to 'src')
| -rw-r--r-- | src/rt/rust_internal.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 4fc6a4cfb1e..4227cd62397 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -130,40 +130,6 @@ template <typename T> struct task_owned { } }; -template<class T> -class smart_ptr { - T *p; - -public: - smart_ptr() : p(NULL) {}; - smart_ptr(T *p) : p(p) { if(p) { p->ref(); } } - smart_ptr(const smart_ptr &sp) : p(sp.p) { - if(p) { p->ref(); } - } - - ~smart_ptr() { - if(p) { - p->deref(); - } - } - - T *operator=(T* p) { - if(this->p) { - this->p->deref(); - } - if(p) { - p->ref(); - } - this->p = p; - - return p; - } - - T *operator->() const { return p; }; - - operator T*() const { return p; } -}; - template <typename T> struct kernel_owned { inline void *operator new(size_t size, rust_kernel *kernel, const char *tag); |
