diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-08 13:08:39 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-08 13:08:39 +0100 |
| commit | 2b96be0ae8b74e6081a00d740dfcbe205f76fb22 (patch) | |
| tree | 780289c3b3e5e72b3f96409c290007498bcec84e /src/string.cpp | |
| parent | 2a89d8021cf95f4a4d7dab269a262a1d2237f71b (diff) | |
Remove unnecessary `typedef` usage
Diffstat (limited to 'src/string.cpp')
| -rw-r--r-- | src/string.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/string.cpp b/src/string.cpp index 105e9961b..6b6302ede 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -9,7 +9,7 @@ void init_string_buffer_memory(void) { // NOTE(bill): Used for UTF-8 strings -typedef struct String { +struct String { u8 * text; isize len; @@ -21,7 +21,7 @@ typedef struct String { GB_ASSERT(0 <= i && i < len); return text[i]; } -} String; +}; // NOTE(bill): used for printf style arguments #define LIT(x) ((int)(x).len), (x).text #define STR_LIT(c_str) {cast(u8 *)c_str, gb_size_of(c_str)-1} @@ -29,7 +29,7 @@ typedef struct String { // NOTE(bill): String16 is only used for Windows due to its file directories -typedef struct String16 { +struct String16 { wchar_t *text; isize len; wchar_t &operator[](isize i) { @@ -40,7 +40,7 @@ typedef struct String16 { GB_ASSERT(0 <= i && i < len); return text[i]; } -} String16; +}; gb_inline String make_string(u8 *text, isize len) { |