Buffer overruns in Geometry tests, ObjCompAssembly
### Expected behavior

Unit tests should pass
### Actual behavior

These two tests fail on win7 / debug mode:
- `GeometryTest_ObjCompAssemblyTest`
- `GeometryTest_ParObjCompAssemblyTest` 

The problem seems to be in `GluGeometryHandler::GetObjectGeom` with `SEGMENTED_CYLINDER`. `vector` has size 0
This is a stack trace for `ParObjCompAssemblyTest`:

```
    msvcp140d.dll!std::_Debug_message(const wchar_t * message, const wchar_t * file, unsigned int line) Line 17 C++
    msvcp140d.dll!std::_Debug_message(const unsigned short * message, const unsigned short * file, unsigned int line) Line 23   C++
    MantidGeometry.dll!std::vector<Mantid::Kernel::V3D,std::allocator<Mantid::Kernel::V3D> >::operator[](unsigned __int64 _Pos) Line 1233   C++
>   MantidGeometry.dll!Mantid::Geometry::GluGeometryHandler::GetObjectGeom(int & mytype, std::vector<Mantid::Kernel::V3D,std::allocator<Mantid::Kernel::V3D> > & vectors, double & myradius, double & myheight) Line 142    C++
    MantidGeometry.dll!Mantid::Geometry::Object::GetObjectGeom(int & type, std::vector<Mantid::Kernel::V3D,std::allocator<Mantid::Kernel::V3D> > & vectors, double & myradius, double & myheight) Line 1963 C++
    GeometryTest.exe!ParObjCompAssemblyTest::testCreateOutlineCylinder() Line 141   C++
    GeometryTest.exe!TestDescription_suite_ParObjCompAssemblyTest_testCreateOutlineCylinder::runTest() Line 57  C++
    GeometryTest.exe!CxxTest::RealTestDescription::run() Line 99    C++
    GeometryTest.exe!CxxTest::TestRunner::runTest(CxxTest::TestDescription & td) Line 95    C++
    GeometryTest.exe!CxxTest::TestRunner::runSuite(CxxTest::SuiteDescription & sd) Line 81  C++
    GeometryTest.exe!CxxTest::TestRunner::runWorld() Line 64    C++
    GeometryTest.exe!CxxTest::TestRunner::runAllTests(CxxTest::TestListener & listener) Line 26 C++
    GeometryTest.exe!CxxTest::XUnitPrinter::run() Line 31   C++
    GeometryTest.exe!CxxTest::Main<CxxTest::XUnitPrinter>(CxxTest::XUnitPrinter & tmp, int argc, char * * argv) Line 107    C++
    GeometryTest.exe!main(int argc, char * * argv) Line 27  C++
    [External Code] 
```

And this is the call stack for the failure in `ObjCompAssemblyTest`:

```
    msvcp140d.dll!std::_Debug_message(const wchar_t * message, const wchar_t * file, unsigned int line) Line 17 C++
    msvcp140d.dll!std::_Debug_message(const unsigned short * message, const unsigned short * file, unsigned int line) Line 23   C++
    MantidGeometry.dll!std::vector<Mantid::Kernel::V3D,std::allocator<Mantid::Kernel::V3D> >::operator[](unsigned __int64 _Pos) Line 1233   C++
>   MantidGeometry.dll!Mantid::Geometry::GluGeometryHandler::GetObjectGeom(int & mytype, std::vector<Mantid::Kernel::V3D,std::allocator<Mantid::Kernel::V3D> > & vectors, double & myradius, double & myheight) Line 142    C++
    MantidGeometry.dll!Mantid::Geometry::Object::GetObjectGeom(int & type, std::vector<Mantid::Kernel::V3D,std::allocator<Mantid::Kernel::V3D> > & vectors, double & myradius, double & myheight) Line 1963 C++
    GeometryTest.exe!ObjCompAssemblyTest::testCreateOutlineCylinder() Line 366  C++
    GeometryTest.exe!TestDescription_suite_ObjCompAssemblyTest_testCreateOutlineCylinder::runTest() Line 129    C++
    GeometryTest.exe!CxxTest::RealTestDescription::run() Line 99    C++
    GeometryTest.exe!CxxTest::TestRunner::runTest(CxxTest::TestDescription & td) Line 95    C++
    GeometryTest.exe!CxxTest::TestRunner::runSuite(CxxTest::SuiteDescription & sd) Line 81  C++
    GeometryTest.exe!CxxTest::TestRunner::runWorld() Line 64    C++
    GeometryTest.exe!CxxTest::TestRunner::runAllTests(CxxTest::TestListener & listener) Line 26 C++
    GeometryTest.exe!CxxTest::XUnitPrinter::run() Line 31   C++
    GeometryTest.exe!CxxTest::Main<CxxTest::XUnitPrinter>(CxxTest::XUnitPrinter & tmp, int argc, char * * argv) Line 107    C++
    GeometryTest.exe!main(int argc, char * * argv) Line 27  C++
    [External Code] 
```
### Steps to reproduce the behavior

Run the tests in debug mode.
### Platforms affected

Windows 7, MSVC in debug mode catches the issue. Probably all platforms are affected.

diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc
index 76609849bf5..75f5f80a81e 100644
--- a/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc
+++ b/Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc
@@ -112,7 +112,7 @@ TMDE(std::vector<Mantid::Kernel::VMD> MDBoxBase)::getVertexes() const {
     for (size_t d = 0; d < nd; d++) {
       // Use a bit mask to look at each bit of the integer we are iterating
       // through.
-      size_t mask = 1 << d;
+      size_t mask = size_t{1} << d;
       if ((i & mask) > 0) {
         // Bit is 1, use the max of the dimension
         coords[d] = extents[d].getMax();
@@ -153,7 +153,7 @@ TMDE(coord_t *MDBoxBase)::getVertexesArray(size_t &numVertices) const {
     for (size_t d = 0; d < nd; d++) {
       // Use a bit mask to look at each bit of the integer we are iterating
       // through.
-      size_t mask = 1 << d;
+      size_t mask = size_t{1} << d;
       if ((i & mask) > 0) {
         // Bit is 1, use the max of the dimension
         out[outIndex + d] = extents[d].getMax();
diff --git a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc
index c5fae16baa2..6172934d5be 100644
--- a/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc
+++ b/Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc
@@ -518,7 +518,7 @@ TMDE(void MDGridBox)::getBoxes(std::vector<API::IMDNode *> &outBoxes,
       for (size_t d = 0; d < nd; d++) {
         vertIndex[d] = 0;
         // Use a bit mask to iterate through the 2^nd neighbor options
-        size_t mask = 1 << d;
+        size_t mask = size_t{1} << d;
         if (i & mask)
           vertIndex[d] = 1;
       }
diff --git a/Framework/DataObjects/src/MDHistoWorkspace.cpp b/Framework/DataObjects/src/MDHistoWorkspace.cpp
index 2a0cf9dd1d3..def9c79d132 100644
--- a/Framework/DataObjects/src/MDHistoWorkspace.cpp
+++ b/Framework/DataObjects/src/MDHistoWorkspace.cpp
@@ -205,7 +205,8 @@ void MDHistoWorkspace::initVertexesArray() {
   size_t nd = numDimensions;
   // How many vertices does one box have? 2^nd, or bitwise shift left 1 by nd
   // bits
-  size_t numVertices = 1 << numDimensions;
+  // cppcheck-suppress constStatement
+  size_t numVertices = size_t{1} << numDimensions;
 
   // Allocate the array of the right size
   m_vertexesArray = new coord_t[nd * numVertices];
@@ -219,7 +220,8 @@ void MDHistoWorkspace::initVertexesArray() {
     for (size_t d = 0; d < nd; d++) {
       // Use a bit mask to look at each bit of the integer we are iterating
       // through.
-      size_t mask = 1 << d;
+      // cppcheck-suppress constStatement
+      size_t mask = size_t{1} << d;
       if ((i & mask) > 0) {
         // Bit is 1, use the max of the dimension
         m_vertexesArray[outIndex + d] = m_dimensions[d]->getX(1);
diff --git a/Framework/Geometry/inc/MantidGeometry/Rendering/GluGeometryHandler.h b/Framework/Geometry/inc/MantidGeometry/Rendering/GluGeometryHandler.h
index 01a96c30ee4..286a059ea27 100644
--- a/Framework/Geometry/inc/MantidGeometry/Rendering/GluGeometryHandler.h
+++ b/Framework/Geometry/inc/MantidGeometry/Rendering/GluGeometryHandler.h
@@ -50,9 +50,9 @@ class MANTID_GEOMETRY_DLL GluGeometryHandler : public GeometryHandler {
   enum GEOMETRY_TYPE {
     CUBOID,            ///< CUBOID
     HEXAHEDRON,        ///< HEXAHEDRON
+    SPHERE,            ///< SPHERE
     CYLINDER,          ///< CYLINDER
     CONE,              ///< CONE
-    SPHERE,            ///< SPHERE
     SEGMENTED_CYLINDER ///< Cylinder with 1 or more segments (along the axis).
     /// Sizes of segments are important.
   };
diff --git a/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp b/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp
index 8d38be57f3d..4cff1d1e117 100644
--- a/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp
+++ b/Framework/Geometry/src/Rendering/GluGeometryHandler.cpp
@@ -94,53 +94,22 @@ void GluGeometryHandler::GetObjectGeom(int &mytype,
                                        double &myradius, double &myheight) {
   mytype = 0;
   if (Obj != nullptr) {
+    mytype = static_cast<int>(type);
     switch (type) {
     case CUBOID:
       mytype = 1;
-      vectors.resize(4);
-      vectors[0] = Point1;
-      vectors[1] = Point2;
-      vectors[2] = Point3;
-      vectors[3] = Point4;
+      vectors.assign({Point1, Point2, Point3, Point4});
       break;
     case HEXAHEDRON:
-      mytype = 1;
-      vectors.resize(8);
-      vectors[0] = Point1;
-      vectors[1] = Point2;
-      vectors[2] = Point3;
-      vectors[3] = Point4;
-      vectors[4] = Point5;
-      vectors[5] = Point6;
-      vectors[6] = Point7;
-      vectors[7] = Point8;
+      vectors.assign(
+          {Point1, Point2, Point3, Point4, Point5, Point6, Point7, Point8});
       break;
     case SPHERE:
-      mytype = 2;
-      vectors.push_back(center);
-      myradius = radius;
-      break;
-    case CYLINDER:
-      mytype = 3;
-      vectors.resize(2);
-      vectors[0] = center;
-      vectors[1] = axis;
-      myradius = radius;
-      myheight = height;
-      break;
-    case CONE:
-      mytype = 4;
-      vectors.resize(2);
-      vectors[0] = center;
-      vectors[1] = axis;
+      vectors.assign({center});
       myradius = radius;
-      myheight = height;
       break;
-    case SEGMENTED_CYLINDER:
-      mytype = 5;
-      vectors.reserve(2);
-      vectors[0] = center;
-      vectors[1] = axis;
+    default:
+      vectors.assign({center, axis});
       myradius = radius;
       myheight = height;
       break;
diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py
index b554f98a58c..c93b84b5bcf 100644
--- a/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py
+++ b/Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py
@@ -60,11 +60,7 @@ class VesuvioTOFFitTest(unittest.TestCase):
         self.assertAlmostEqual(0.0155041, output_ws.readY(0)[0])
         self.assertAlmostEqual(-0.0070975, output_ws.readY(0)[-1])
         self.assertAlmostEqual(0.8693019e-05, output_ws.readY(1)[0])
-        if platform.system() == "Darwin":
-            self.assertAlmostEqual(0.7463842e-04, output_ws.readY(1)[-1])
-        else:
-            self.assertAlmostEqual(0.7458504e-04, output_ws.readY(1)[-1])
-
+        self.assertTrue(abs(0.746e-04 - output_ws.readY(1)[-1]) < 0.2e-06)
 
     def test_single_run_produces_correct_output_workspace_index0_kfixed_including_background(self):
         profiles = "function=GramCharlier,width=[2, 5, 7],hermite_coeffs=[1, 0, 0],k_free=0,sears_flag=1;"\
@@ -86,13 +82,8 @@ class VesuvioTOFFitTest(unittest.TestCase):
 
         self.assertAlmostEqual(0.0279822, output_ws.readY(0)[0])
         self.assertAlmostEqual(0.0063585, output_ws.readY(0)[-1])
-        # Small difference in fitting between windows and other platforms
-        if platform.system() == "Windows":
-            self.assertAlmostEqual(-0.010972, output_ws.readY(1)[0])
-        else:
-            self.assertAlmostEqual(-0.0119362, output_ws.readY(1)[0])
-            self.assertAlmostEqual(0.00554965, output_ws.readY(1)[-1])
-
+        self.assertTrue(abs(-0.012 - output_ws.readY(1)[0]) < 0.002)
+        self.assertTrue(abs(0.0056 - output_ws.readY(1)[-1]) < 0.0004)
     # -------------- Failure cases ------------------
 
     def test_empty_masses_raises_error(self):
diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DynamicPDF/SliceSelector.ui b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DynamicPDF/SliceSelector.ui
index 57f4c6f64e6..4999136cf31 100644
--- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DynamicPDF/SliceSelector.ui
+++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DynamicPDF/SliceSelector.ui
@@ -128,7 +128,7 @@
      </sizepolicy>
     </property>
    </widget>
-   <widget class="QWidget" name="layoutWidget">
+   <widget class="QWidget" name="layoutWidget1">
     <property name="geometry">
      <rect>
       <x>10</x>
['Framework/DataObjects/inc/MantidDataObjects/MDGridBox.tcc', 'Framework/DataObjects/inc/MantidDataObjects/MDBoxBase.tcc', 'Framework/DataObjects/src/MDHistoWorkspace.cpp', 'MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/DynamicPDF/SliceSelector.ui', 'Framework/PythonInterface/test/python/plugins/algorithms/VesuvioTOFFitTest.py', 'Framework/Geometry/inc/MantidGeometry/Rendering/GluGeometryHandler.h', 'Framework/Geometry/src/Rendering/GluGeometryHandler.cpp']