revert const changes to oc_font_create_from_*

* Martin has said the orca style is to avoid const, so we will avoid adding it where it isn't already present
* Zig bindings doesn't need the corresponding C function to have const-decorated types
This commit is contained in:
Reuben Dunnington 2023-09-29 23:14:43 -04:00
parent eb60729721
commit 3e6cd07b34
Signed by: rdunnington
GPG Key ID: 3D57C8938EA08E90
2 changed files with 6 additions and 6 deletions

View File

@ -227,9 +227,9 @@ ORCA_API void oc_render(oc_canvas canvas); //DOC: renders all canvas
ORCA_API oc_font oc_font_nil(void); ORCA_API oc_font oc_font_nil(void);
ORCA_API bool oc_font_is_nil(oc_font font); ORCA_API bool oc_font_is_nil(oc_font font);
ORCA_API oc_font oc_font_create_from_memory(oc_str8 mem, u32 rangeCount, const oc_unicode_range* ranges); ORCA_API oc_font oc_font_create_from_memory(oc_str8 mem, u32 rangeCount, oc_unicode_range* ranges);
ORCA_API oc_font oc_font_create_from_file(oc_file file, u32 rangeCount, const oc_unicode_range* ranges); ORCA_API oc_font oc_font_create_from_file(oc_file file, u32 rangeCount, oc_unicode_range* ranges);
ORCA_API oc_font oc_font_create_from_path(oc_str8 path, u32 rangeCount, const oc_unicode_range* ranges); ORCA_API oc_font oc_font_create_from_path(oc_str8 path, u32 rangeCount, oc_unicode_range* ranges);
ORCA_API void oc_font_destroy(oc_font font); ORCA_API void oc_font_destroy(oc_font font);

View File

@ -369,7 +369,7 @@ oc_font_data* oc_font_data_from_handle(oc_font handle)
return (data); return (data);
} }
oc_font oc_font_create_from_memory(oc_str8 mem, u32 rangeCount, const oc_unicode_range* ranges) oc_font oc_font_create_from_memory(oc_str8 mem, u32 rangeCount, oc_unicode_range* ranges)
{ {
if(!oc_graphicsData.init) if(!oc_graphicsData.init)
{ {
@ -552,7 +552,7 @@ oc_font oc_font_create_from_memory(oc_str8 mem, u32 rangeCount, const oc_unicode
return (fontHandle); return (fontHandle);
} }
oc_font oc_font_create_from_file(oc_file file, u32 rangeCount, const oc_unicode_range* ranges) oc_font oc_font_create_from_file(oc_file file, u32 rangeCount, oc_unicode_range* ranges)
{ {
oc_font font = oc_font_nil(); oc_font font = oc_font_nil();
oc_arena_scope scratch = oc_scratch_begin(); oc_arena_scope scratch = oc_scratch_begin();
@ -574,7 +574,7 @@ oc_font oc_font_create_from_file(oc_file file, u32 rangeCount, const oc_unicode_
return (font); return (font);
} }
oc_font oc_font_create_from_path(oc_str8 path, u32 rangeCount, const oc_unicode_range* ranges) oc_font oc_font_create_from_path(oc_str8 path, u32 rangeCount, oc_unicode_range* ranges)
{ {
oc_font font = oc_font_nil(); oc_font font = oc_font_nil();