From 65aaf2738073c5aee46576b81eaa112125621416 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 6 Oct 2016 10:53:10 +0100 Subject: [PATCH] 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. --- test/objects/test.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/objects/test.hpp b/test/objects/test.hpp index ae6e90a7..a8c81263 100644 --- a/test/objects/test.hpp +++ b/test/objects/test.hpp @@ -186,8 +186,10 @@ namespace test switch(type_) { case 1: result = x.tag1_; + break; case 2: result = x.tag2_; + break; default: result = x.tag1_ + x.tag2_; } @@ -199,8 +201,10 @@ namespace test switch(type_) { case 1: result = x.tag1_; + break; case 2: result = x.tag2_; + break; default: result = x.tag1_ + x.tag2_; } @@ -212,8 +216,10 @@ namespace test switch(type_) { case 1: result = x; + break; case 2: result = x * 7; + break; default: result = x * 256; }