mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 17:34:34 +00:00
Remove dead code in the compiler
This commit is contained in:
@@ -89,14 +89,6 @@ gb_internal char *alloc_cstring(gbAllocator a, String s) {
|
||||
return c_str;
|
||||
}
|
||||
|
||||
gb_internal char *cstring_duplicate(gbAllocator a, char const *s) {
|
||||
isize len = gb_strlen(s);
|
||||
char *c_str = gb_alloc_array(a, char, len+1);
|
||||
gb_memmove(c_str, s, len);
|
||||
c_str[len] = '\0';
|
||||
return c_str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gb_internal gb_inline bool str_eq_ignore_case(String const &a, String const &b) {
|
||||
@@ -166,12 +158,6 @@ gb_internal isize string_index_byte(String const &s, u8 x) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
gb_internal GB_COMPARE_PROC(string_cmp_proc) {
|
||||
String x = *(String *)a;
|
||||
String y = *(String *)b;
|
||||
return string_compare(x, y);
|
||||
}
|
||||
|
||||
gb_internal gb_inline bool str_eq(String const &a, String const &b) {
|
||||
if (a.len != b.len) return false;
|
||||
return memcmp(a.text, b.text, a.len) == 0;
|
||||
|
||||
Reference in New Issue
Block a user