Fix the Windows build (flutter/engine#8106)
* Make macro for logging embedder errors build on Windows
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user