Fix incorrect use of 'inline' in place of 'static'/'static inline' in some C files

This commit is contained in:
Anton Shangareev
2025-11-26 21:20:16 +04:00
committed by jbrbot
parent a7714f7369
commit 4a6ca52fc9
4 changed files with 6 additions and 6 deletions

View File

@@ -34,7 +34,7 @@
#undef SHADER_ENTRY
#undef BYTECODE_END
inline void hash(uint32_t* result, int i) { // Good for hashing enums.
static void hash(uint32_t* result, int i) { // Good for hashing enums.
uint32_t x = (uint32_t) i;
x = ((x >> 16U) ^ x) * 0x45d9f3bU;
x = ((x >> 16U) ^ x) * 0x45d9f3bU;

View File

@@ -206,7 +206,7 @@ VKTexturePool *VKRenderer_GetTexturePool(VKRenderer* renderer) {
/**
* Helper function for POOL_TAKE macro.
*/
inline VkBool32 VKRenderer_CheckPoolEntryAvailable(VKRenderer* renderer, void* entry) {
static VkBool32 VKRenderer_CheckPoolEntryAvailable(VKRenderer* renderer, void* entry) {
if (entry == NULL) return VK_FALSE;
uint64_t timestamp = *((uint64_t*) entry);
return renderer->readTimestamp >= timestamp ||
@@ -580,14 +580,14 @@ void VKRenderer_Flush(VKRenderer* renderer) {
/**
* Get Color RGBA components in a format suitable for the current render pass.
*/
inline RGBA VKRenderer_GetRGBA(VKSDOps* surface, Color color) {
static RGBA VKRenderer_GetRGBA(VKSDOps* surface, Color color) {
return VKUtil_GetRGBA(color, surface->renderPass->outAlphaType);
}
/**
* Record draw command, if there are any pending vertices in the vertex buffer
*/
inline void VKRenderer_FlushDraw(VKSDOps* surface) {
static void VKRenderer_FlushDraw(VKSDOps* surface) {
assert(surface != NULL && surface->renderPass != NULL);
if (surface->renderPass->vertexCount > 0) {
assert(surface->renderPass->pendingCommands);

View File

@@ -87,7 +87,7 @@ JNIEXPORT VKSDOps* VKSD_CreateSurface(JNIEnv* env, jobject vksd, jint drawableTy
*/
JNIEXPORT void VKSD_InitWindowSurface(JNIEnv *env, jobject vksd, VKWinSD_SurfaceInitCallback initCallback, void* data);
inline VkBool32 VKSD_IsOpaque(VKSDOps* vksdo) {
static inline VkBool32 VKSD_IsOpaque(VKSDOps* vksdo) {
return vksdo->drawableFormat & VKSD_FORMAT_OPAQUE_BIT ? VK_TRUE : VK_FALSE;
}

View File

@@ -43,7 +43,7 @@
// Useful logging & result checking macros
JNIEXPORT void VKUtil_LogResultError(const char* string, VkResult result);
inline VkBool32 VKUtil_CheckError(VkResult result, const char* errorMessage) {
static inline VkBool32 VKUtil_CheckError(VkResult result, const char* errorMessage) {
if (result != VK_SUCCESS) {
VKUtil_LogResultError(errorMessage, result);
return VK_TRUE;