Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f591be70 authored by Tim Van Patten's avatar Tim Van Patten
Browse files

vkjson: Move redefinition of FALLTHROUGH_INTENDED

The macro FALLTHROUGH_INTENDED is defined in both
vulkan/vkjson/vkjson.h and android-base/macros.h, causing build errors
for any other modules that include both header files.

Move the redefinition to vkjson.cc.

Note that <android-base/macros.h> is not available for the libvkjson_ndk
build, so we cannot use that version of the macro and eliminate the
redefinition entirely.

Bug: 372694741
Test: CQ
Flag: EXEMPT bugfix
Change-Id: I02a0f2a50f3807ca932e84a5a002598b04c5f92a
parent 87320a61
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,12 @@

namespace {

/*
 * Annotation to tell clang that we intend to fall through from one case to
 * another in a switch. Sourced from android-base/macros.h.
 */
#define FALLTHROUGH_INTENDED [[clang::fallthrough]]

inline bool IsIntegral(double value) {
#if defined(ANDROID)
  // Android NDK doesn't provide std::trunc yet
+0 −6
Original line number Diff line number Diff line
@@ -33,12 +33,6 @@
#undef max
#endif

/*
 * Annotation to tell clang that we intend to fall through from one case to
 * another in a switch. Sourced from android-base/macros.h.
 */
#define FALLTHROUGH_INTENDED [[clang::fallthrough]]

struct VkJsonLayer {
  VkLayerProperties properties;
  std::vector<VkExtensionProperties> extensions;