Add missing #include <algorithm> to scoped_ptr.h

Originally committed to SVN as r5654.
This commit is contained in:
Thomas Goyne 2011-09-28 19:50:50 +00:00
parent 5a49abb2eb
commit bfcd76c4aa

View file

@ -20,6 +20,10 @@
#pragma once
#ifndef LAGI_PRE
#include <algorithm>
#endif
namespace agi {
/// @class scoped_ptr
@ -36,14 +40,14 @@ public:
T* operator->() const { return ptr; }
T* get() const { return ptr; }
void reset(T *p = NULL) {
void reset(T *p = 0) {
delete ptr;
ptr = p;
}
void swap(scoped_ptr &b) { using std::swap; swap(ptr, b.ptr); }
explicit scoped_ptr(T *ptr = NULL) : ptr(ptr){ }
explicit scoped_ptr(T *ptr = 0) : ptr(ptr){ }
~scoped_ptr() { delete ptr; }
};