mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-19 21:32:58 -04:00
pallocator -> dallocator
This commit is contained in:
parent
03d282b54a
commit
b8f3e146ee
@ -59,25 +59,20 @@ deallocate(void *p, size_t) {
|
|||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
INLINE dallocator<Type>::
|
INLINE dallocator<Type>::
|
||||||
dallocator() {
|
dallocator() throw() {
|
||||||
}
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
INLINE dallocator<Type>::
|
|
||||||
dallocator(const allocator<Type> ©) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
INLINE dallocator<Type>::pointer dallocator<Type>::
|
INLINE dallocator<Type>::pointer dallocator<Type>::
|
||||||
allocate(dallocator<Type>::size_type n, allocator<void>::const_pointer) {
|
allocate(dallocator<Type>::size_type n, allocator<void>::const_pointer) {
|
||||||
return (dallocator<Type>::pointer)default_operator_new(n * sizeof(Type));
|
return (dallocator<Type>::pointer)(*global_operator_new)(n * sizeof(Type));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
INLINE void dallocator<Type>::
|
INLINE void dallocator<Type>::
|
||||||
//deallocate(dallocator<Type>::pointer p, allocator<Type>::size_type) {
|
//deallocate(dallocator<Type>::pointer p, allocator<Type>::size_type) {
|
||||||
deallocate(void *p, allocator<Type>::size_type) {
|
deallocate(void *p, allocator<Type>::size_type) {
|
||||||
default_operator_delete(p);
|
(*global_operator_delete)(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // *_STYLE_ALLOCATOR
|
#endif // *_STYLE_ALLOCATOR
|
||||||
|
@ -78,10 +78,17 @@ public:
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class dallocator : public allocator<Type> {
|
class dallocator : public allocator<Type> {
|
||||||
public:
|
public:
|
||||||
INLINE dallocator();
|
INLINE dallocator() throw();
|
||||||
INLINE dallocator(const allocator<Type> ©);
|
|
||||||
|
// template member functions in VC++ can only be defined in-class.
|
||||||
|
template<class U>
|
||||||
|
INLINE dallocator(const dallocator<U> ©) throw() { }
|
||||||
|
|
||||||
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
|
INLINE pointer allocate(size_type n, allocator<void>::const_pointer hint = 0);
|
||||||
INLINE void deallocate(void *p, size_type n);
|
INLINE void deallocate(void *p, size_type n);
|
||||||
|
|
||||||
|
template<class U>
|
||||||
|
struct rebind { typedef dallocator<U> other; };
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user