Fix: Reduce compilation warnings

Reduces compilation warnings on
- clang
- GCC < 14
- MSVC

Pull Request: https://projects.blender.org/blender/blender/pulls/122298
This commit is contained in:
Jeroen Bakker
2024-05-27 10:30:54 +02:00
parent 4708e9ec6d
commit da4f84a416

View File

@@ -17,10 +17,12 @@ namespace blender::gpu {
class VKContext;
class VKCommandBuffers;
#pragma GCC diagnostic push
#if (defined(__GNUC__) && __GNUC__ >= 14 && !defined(__clang__))
# pragma GCC diagnostic push
/* CPP20 compiler warnings in GCC14+.
* Must be resolved before upgrading to a newer C++, avoid noisy warnings for now. */
#pragma GCC diagnostic ignored "-Wtemplate-id-cdtor"
# pragma GCC diagnostic ignored "-Wtemplate-id-cdtor"
#endif
/**
* In vulkan multiple commands can be in flight simultaneously.
@@ -188,6 +190,8 @@ template<typename Resource> class VKResourceTracker : NonCopyable {
}
};
#pragma GCC diagnostic pop
#if (defined(__GNUC__) && __GNUC__ >= 14 && !defined(__clang__))
# pragma GCC diagnostic pop
#endif
} // namespace blender::gpu