removed interfaces pointer by default from BasicInterface

This commit is contained in:
John Preston 2016-01-26 13:24:15 +03:00
parent a677f784f5
commit 07c81db79a
2 changed files with 10 additions and 2 deletions

View file

@ -270,7 +270,7 @@ public:
class OverviewItemInfo : public BasicInterface<OverviewItemInfo> {
public:
OverviewItemInfo() : _top(0) {
OverviewItemInfo(Interfaces *) : _top(0) {
}
int32 top() const {
return _top;

View file

@ -39,7 +39,7 @@ template <typename Type>
struct InterfaceWrapTemplate {
static const int Size = CeilDivideMinimumOne<sizeof(Type), sizeof(uint64)>::Result * sizeof(uint64);
static void Construct(void *location, Interfaces *interfaces) {
(new (location) Type())->interfaces = interfaces;
new (location) Type(interfaces);
}
static void Destruct(void *location) {
((Type*)location)->~Type();
@ -72,6 +72,14 @@ public:
static const uint64 Bit() {
return (1 << Index());
}
};
template <typename Type>
class BasicInterfaceWithPointer : public BasicInterface<Type> {
public:
BasicInterfaceWithPointer(Interfaces *interfaces) : interfaces(interfaces) {
}
Interfaces *interfaces = 0;
};