Remove unneeded disabled warnings for MSVC

This commit is contained in:
gingerBill
2018-02-25 12:29:48 +00:00
parent 3b5932699c
commit 1cd453db14
4 changed files with 8 additions and 25 deletions

View File

@@ -18,9 +18,8 @@ set compiler_warnings= ^
-W4 -WX ^
-wd4100 -wd4101 -wd4127 -wd4189 ^
-wd4201 -wd4204 -wd4244 ^
-wd4306 ^
-wd4456 -wd4457 -wd4480 ^
-wd4505 -wd4512 -wd4550
-wd4456 -wd4457 ^
-wd4512
set compiler_includes=
set libs= ^
@@ -45,7 +44,6 @@ del *.ilk > NUL 2> NUL
cl %compiler_settings% "src\main.cpp" ^
/link %linker_settings% -OUT:%exe_name% ^
&& odin run examples/demo.odin
rem && odin docs core/fmt.odin
del *.obj > NUL 2> NUL

View File

@@ -46,9 +46,10 @@ struct ExactValue {
gb_global ExactValue const empty_exact_value = {};
HashKey hash_exact_value(ExactValue v) {
HashKey empty = {};
switch (v.kind) {
case ExactValue_Invalid:
return HashKey{};
return empty;
case ExactValue_Bool:
return hash_integer(u64(v.value_bool));
case ExactValue_String:

View File

@@ -2671,10 +2671,10 @@ AstNode *parse_proc_type(AstFile *f, Token proc_token) {
for_array(i, params->FieldList.list) {
AstNode *param = params->FieldList.list[i];
ast_node(f, Field, param);
if (f->type != nullptr) {
if (f->type->kind == AstNode_TypeType ||
f->type->kind == AstNode_PolyType) {
ast_node(field, Field, param);
if (field->type != nullptr) {
if (field->type->kind == AstNode_TypeType ||
field->type->kind == AstNode_PolyType) {
is_generic = true;
break;
}

View File

@@ -61,22 +61,6 @@ gb_internal StringSetFindResult string_set__find(StringSet *s, HashKey key) {
return fr;
}
gb_internal StringSetFindResult string_set__find_from_entry(StringSet *s, StringSetEntry *e) {
StringSetFindResult fr = {-1, -1, -1};
if (s->hashes.count > 0) {
fr.hash_index = e->key.key % s->hashes.count;
fr.entry_index = s->hashes[fr.hash_index];
while (fr.entry_index >= 0) {
if (&s->entries[fr.entry_index] == e) {
return fr;
}
fr.entry_prev = fr.entry_index;
fr.entry_index = s->entries[fr.entry_index].next;
}
}
return fr;
}
gb_internal b32 string_set__full(StringSet *s) {
return 0.75f * s->hashes.count <= s->entries.count;
}