Add missing #include <algorithm> to scoped_ptr.h
Originally committed to SVN as r5654.
This commit is contained in:
parent
5a49abb2eb
commit
bfcd76c4aa
1 changed files with 6 additions and 2 deletions
|
@ -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; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue