About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
STRUCT in define.h
Author Message
fatcoder Offline
Member

Post: #1
STRUCT in define.h
This is just a minor thing, but it would be nice if you added something like this to define.h.

Code:
#define STRUCT(Base) struct Base {

This would make it easier to create structs with consistent styling. For example, I often end up writing code like this and then realise it doesn't compile, so I have to change it to just use struct.

Code:
STRUCT(MyClass)

};

When you change it, you end up with code like this, which just doesn't look consistent.

Code:
struct MyClass
{

};

STRUCT(MyDerivedClass, MyClass)

};

Anyway, as I said, just a minor thing, but after working with EE for so many years, you start to notice these little things. smile
06-30-2014 08:31 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: STRUCT in define.h
Hi,

When you use Code Editor then you don't need 'STRUCT' at all.
06-30-2014 09:08 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #3
RE: STRUCT in define.h
Ah, yes you are right. I see that. Oh well, guess I'll stop using STRUCT and just go back to using class.
06-30-2014 11:08 AM
Find all posts by this user Quote this message in a reply
Post Reply