fix: Restore Windows macro definitions to prevent conflicts with protobuf generated code
- Added preprocessor directives to push and pop the DWORD and ERROR macros in widget_discovery_service.h, rom_service_impl.h, and gui_automation_client.h. - This change ensures compatibility with protobuf generated code in a Windows environment, preventing potential compilation issues.
This commit is contained in:
@@ -19,15 +19,20 @@
|
||||
#ifdef YAZE_WITH_GRPC
|
||||
// Undefine Windows macros that conflict with protobuf generated code
|
||||
#ifdef _WIN32
|
||||
#ifdef DWORD
|
||||
#pragma push_macro("DWORD")
|
||||
#pragma push_macro("ERROR")
|
||||
#undef DWORD
|
||||
#endif
|
||||
#ifdef ERROR
|
||||
#undef ERROR
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include "protos/imgui_test_harness.grpc.pb.h"
|
||||
|
||||
// Restore Windows macros
|
||||
#ifdef _WIN32
|
||||
#pragma pop_macro("DWORD")
|
||||
#pragma pop_macro("ERROR")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace yaze {
|
||||
|
||||
Reference in New Issue
Block a user