forked from boostorg/unordered
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:
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user