Rename wapp_str8_buf_alloc to wapp_str8_alloc_buf
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
internal Str8List node_to_list(Str8Node *node);
|
||||
|
||||
Str8 *wapp_str8_buf_alloc(const Allocator *allocator, u64 capacity) {
|
||||
Str8 *wapp_str8_alloc_buf(const Allocator *allocator, u64 capacity) {
|
||||
Str8 *str = NULL;
|
||||
|
||||
if (!allocator) {
|
||||
@@ -40,7 +40,7 @@ Str8 *wapp_str8_alloc_cstr(const Allocator *allocator, const char *str) {
|
||||
}
|
||||
|
||||
u64 length = strlen(str);
|
||||
output = wapp_str8_buf_alloc(allocator, length * 2);
|
||||
output = wapp_str8_alloc_buf(allocator, length * 2);
|
||||
if (!output) {
|
||||
goto RETURN_ALLOC_CSTR;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ Str8 *wapp_str8_alloc_str8(const Allocator *allocator, Str8RO *str) {
|
||||
goto RETURN_ALLOC_STR8;
|
||||
}
|
||||
|
||||
output = wapp_str8_buf_alloc(allocator, str->capacity);
|
||||
output = wapp_str8_alloc_buf(allocator, str->capacity);
|
||||
if (!output) {
|
||||
goto RETURN_ALLOC_STR8;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ Str8 *wapp_str8_concat(const Allocator *allocator, Str8 *dst, Str8RO *src) {
|
||||
|
||||
u64 capacity = dst->capacity + src->size;
|
||||
|
||||
output = wapp_str8_buf_alloc(allocator, capacity);
|
||||
output = wapp_str8_alloc_buf(allocator, capacity);
|
||||
if (!output) {
|
||||
goto RETURN_STR8_CONCAT;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ Str8 *wapp_str8_join(const Allocator *allocator, const Str8List *list, Str8RO *d
|
||||
}
|
||||
|
||||
u64 capacity = list->total_size + (delimiter->size * (list->node_count - 1));
|
||||
Str8 *output = wapp_str8_buf_alloc(allocator, capacity * 2);
|
||||
Str8 *output = wapp_str8_alloc_buf(allocator, capacity * 2);
|
||||
|
||||
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
|
||||
// MSVC Spectre mitigation warnings
|
||||
|
@@ -57,7 +57,7 @@ struct str8_list {
|
||||
/**
|
||||
* Str8 allocated buffers
|
||||
*/
|
||||
Str8 *wapp_str8_buf_alloc(const Allocator *allocator, u64 capacity);
|
||||
Str8 *wapp_str8_alloc_buf(const Allocator *allocator, u64 capacity);
|
||||
Str8 *wapp_str8_alloc_cstr(const Allocator *allocator, const char *str);
|
||||
Str8 *wapp_str8_alloc_str8(const Allocator *allocator, Str8RO *str);
|
||||
|
||||
|
Reference in New Issue
Block a user