aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-02-25 12:29:48 +0000
committergingerBill <bill@gingerbill.org>2018-02-25 12:29:48 +0000
commit1cd453db14c80988a7cd29bbc9ea1f70e45ad513 (patch)
tree0973ed0df422a1ef8c6b4018a70a1b8e59385f9e /src
parent3b5932699cce49504fc555d32f944de48d30dd35 (diff)
Remove unneeded disabled warnings for MSVC
Diffstat (limited to 'src')
-rw-r--r--src/exact_value.cpp3
-rw-r--r--src/parser.cpp8
-rw-r--r--src/string_set.cpp16
3 files changed, 6 insertions, 21 deletions
diff --git a/src/exact_value.cpp b/src/exact_value.cpp
index ed181b9d0..c9ae402e0 100644
--- a/src/exact_value.cpp
+++ b/src/exact_value.cpp
@@ -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:
diff --git a/src/parser.cpp b/src/parser.cpp
index 7b3bee25d..123230823 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -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;
}
diff --git a/src/string_set.cpp b/src/string_set.cpp
index 9e44e1b1e..a6700839d 100644
--- a/src/string_set.cpp
+++ b/src/string_set.cpp
@@ -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;
}