Open main menu

Difference between revisions of "TODO"

18 bytes added ,  15:02, 25 October 2018
m
Text replacement - "<source lang=" to "<syntaxhighlight lang="
m (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Line 100: Line 100:
is valid for which event type. Implementation wise, we might want to use
is valid for which event type. Implementation wise, we might want to use
the classic union-of-structs trick. It goes roughly like this:
the classic union-of-structs trick. It goes roughly like this:
<source lang="cpp">
<syntaxhighlight lang="cpp">
struct BasicEvent {
struct BasicEvent {
     EventType type;
     EventType type;
Line 132: Line 132:
casting in code using events. The passing around of pointers could be
casting in code using events. The passing around of pointers could be
mitigated by using
mitigated by using
<source lang="cpp">
<syntaxhighlight lang="cpp">
typedef Common::SharedPtr<BasicEvent> Event
typedef Common::SharedPtr<BasicEvent> Event
</source>
</source>
TrustedUser
2,147

edits