Fix accidental fallthrough in switch cases.

This was causing the hash function to be different to the equality
function. For some reason this resulted in a lot of windows test
failures, but none on linux or os x. I'm a bit confused and worried
about that.
This commit is contained in:
Daniel James
2016-10-06 10:53:10 +01:00
parent b1588929cc
commit 65aaf27380

View File

@ -186,8 +186,10 @@ namespace test
switch(type_) { switch(type_) {
case 1: case 1:
result = x.tag1_; result = x.tag1_;
break;
case 2: case 2:
result = x.tag2_; result = x.tag2_;
break;
default: default:
result = x.tag1_ + x.tag2_; result = x.tag1_ + x.tag2_;
} }
@ -199,8 +201,10 @@ namespace test
switch(type_) { switch(type_) {
case 1: case 1:
result = x.tag1_; result = x.tag1_;
break;
case 2: case 2:
result = x.tag2_; result = x.tag2_;
break;
default: default:
result = x.tag1_ + x.tag2_; result = x.tag1_ + x.tag2_;
} }
@ -212,8 +216,10 @@ namespace test
switch(type_) { switch(type_) {
case 1: case 1:
result = x; result = x;
break;
case 2: case 2:
result = x * 7; result = x * 7;
break;
default: default:
result = x * 256; result = x * 256;
} }