0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

libobs/graphics: Add inline qualifier to functions in header files

This commit is contained in:
Norihiro Kamae 2024-07-29 23:44:28 +09:00 committed by Ryan Foster
parent 123231c97c
commit 71736ffb7d
2 changed files with 8 additions and 8 deletions

View File

@ -51,7 +51,7 @@ struct half {
};
/* adapted from DirectXMath XMConvertFloatToHalf */
static struct half half_from_float(float f)
static inline struct half half_from_float(float f)
{
uint32_t Result;
@ -90,7 +90,7 @@ static struct half half_from_float(float f)
return h;
}
static struct half half_from_bits(uint16_t u)
static inline struct half half_from_bits(uint16_t u)
{
struct half h;
h.u = u;

View File

@ -94,33 +94,33 @@ EXPORT bool gs_image_file4_tick(gs_image_file4_t *if4,
uint64_t elapsed_time_ns);
EXPORT void gs_image_file4_update_texture(gs_image_file4_t *if4);
static void gs_image_file2_free(gs_image_file2_t *if2)
static inline void gs_image_file2_free(gs_image_file2_t *if2)
{
gs_image_file_free(&if2->image);
if2->mem_usage = 0;
}
static void gs_image_file2_init_texture(gs_image_file2_t *if2)
static inline void gs_image_file2_init_texture(gs_image_file2_t *if2)
{
gs_image_file_init_texture(&if2->image);
}
static void gs_image_file3_free(gs_image_file3_t *if3)
static inline void gs_image_file3_free(gs_image_file3_t *if3)
{
gs_image_file2_free(&if3->image2);
}
static void gs_image_file3_init_texture(gs_image_file3_t *if3)
static inline void gs_image_file3_init_texture(gs_image_file3_t *if3)
{
gs_image_file2_init_texture(&if3->image2);
}
static void gs_image_file4_free(gs_image_file4_t *if4)
static inline void gs_image_file4_free(gs_image_file4_t *if4)
{
gs_image_file3_free(&if4->image3);
}
static void gs_image_file4_init_texture(gs_image_file4_t *if4)
static inline void gs_image_file4_init_texture(gs_image_file4_t *if4)
{
gs_image_file3_init_texture(&if4->image3);
}