Moved THIS and THIS_ADDR to actorcompiler.h

This commit is contained in:
mpilman 2019-02-19 13:21:33 -08:00 committed by Alex Miller
parent 62bd677cc9
commit 4be90c91d6
4 changed files with 11 additions and 18 deletions

View File

@ -37,18 +37,6 @@
#include "flow/actorcompiler.h" // This must be the last #include.
#ifdef NO_INTELLISENSE
#define THIS_ADDR (uintptr_t)this
#else
#define THIS_ADDR 0
#endif
#ifdef NO_INTELLISENSE
#define THIS this
#else
#define THIS nullptr
#endif
static std::string boolToYesOrNo(bool val) { return val ? std::string("Yes") : std::string("No"); }
static std::string versionToString(Optional<Version> version) {

View File

@ -35,12 +35,6 @@
#include <string.h>
#include "flow/actorcompiler.h"
#ifdef NO_INTELLISENSE
#define THIS_PTR this
#else
#define THIS_PTR nullptr
#endif
// Convenience method for converting a Standalone to a Ref while adding its arena to another arena.
template<typename T> inline const Standalone<T> & dependsOn(Arena &arena, const Standalone<T> &s) {
arena.dependsOn(s.arena());

View File

@ -41,4 +41,12 @@ template <class T> T waitNext( const FutureStream<T>& );
#define loop while(true)
#ifdef NO_INTELLISENSE
#define THIS this
#define THIS_ADDR uintptr_t(this)
#else
#define THIS nullptr
#define THIS_ADDR uintptr_t(nullptr)
#endif
#pragma warning( disable: 4355 ) // 'this' : used in base member initializer list

View File

@ -29,6 +29,9 @@
#undef when
#endif
#undef THIS
#undef THIS_ADDR
#endif
// loop is still defined