mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 15:01:53 -04:00
3b26aae532
* Adding explicit dolphin/ prefix & fix characters * Rename ShiftJIS to SJIS * Separate JASSeqReader read methods implementation between compilers. * Fix pointer.h * fix d_item_data typo * fix gcn matching issue
34 lines
533 B
C++
34 lines
533 B
C++
#ifndef POINTER_H
|
|
#define POINTER_H
|
|
|
|
namespace JGadget {
|
|
|
|
template<class T>
|
|
class TPointer {
|
|
public:
|
|
TPointer(T* ptr) : mPtr(ptr) {}
|
|
~TPointer() {}
|
|
void set(T* ptr) { mPtr = ptr; }
|
|
T* mPtr;
|
|
};
|
|
|
|
template<class T>
|
|
class TPointer_delete : public TPointer<T> {
|
|
public:
|
|
#ifdef __MWERKS__
|
|
TPointer_delete(T* ptr) : TPointer(ptr) {}
|
|
~TPointer_delete() {
|
|
delete mPtr;
|
|
}
|
|
#else
|
|
TPointer_delete(T* ptr) : TPointer<T>(ptr) {}
|
|
~TPointer_delete() {
|
|
delete this->mPtr;
|
|
}
|
|
#endif
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|