Fix the Windows build (flutter/engine#8106)

* Make macro for logging embedder errors build on Windows
This commit is contained in:
Dan Field
2019-03-10 10:46:27 -07:00
committed by GitHub
parent c19f28cd22
commit a068a0b631

View File

@@ -50,15 +50,16 @@ extern const intptr_t kPlatformStrongDillSize;
return static_cast<decltype(pointer->member)>((default_value)); \
})()
#define LOG_EMBEDDER_ERROR(code) \
({ \
do { \
FML_LOG(ERROR) << "Returning error '" << #code << "' (" << code \
<< ") from Flutter Embedder API call to '" \
<< __FUNCTION__ << "'."; \
} while (0); \
(code); \
})
static FlutterEngineResult LogEmbedderError(FlutterEngineResult code,
const char* name,
const char* function) {
FML_LOG(ERROR) << "Returning error '" << name << "' (" << code
<< ") from Flutter Embedder API call to '" << __FUNCTION__
<< "'.";
return code;
}
#define LOG_EMBEDDER_ERROR(code) LogEmbedderError(code, #code, __FUNCTION__)
static bool IsOpenGLRendererConfigValid(const FlutterRendererConfig* config) {
if (config->type != kOpenGL) {