From cf446784a4a2bf6f1720e2109e365a1ac1bb46d0 Mon Sep 17 00:00:00 2001
From: Mathieu Doucet <doucetm@ornl.gov>
Date: Fri, 19 Aug 2011 20:18:40 +0000
Subject: [PATCH] Fix warning. Re #3583

---
 .../src/Mantid/InstrumentWidget/Shape2DCollection.cpp         | 4 ++--
 .../src/Mantid/InstrumentWidget/Shape2DCollection.h           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.cpp b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.cpp
index 7c6eb09116c..debedc4f952 100644
--- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.cpp
+++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.cpp
@@ -264,9 +264,9 @@ bool Shape2DCollection::selectAtXY(int x,int y)
 /**
  * Select a shape with index i.
  */
-void Shape2DCollection::select(size_t i)
+void Shape2DCollection::select(int i)
 {
-  if (i < size())
+  if (i < static_cast<int>(size()))
   {
     select(m_shapes[i]);
   }
diff --git a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.h b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.h
index ac9486f64a8..fb80e38b377 100644
--- a/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.h
+++ b/Code/Mantid/MantidPlot/src/Mantid/InstrumentWidget/Shape2DCollection.h
@@ -39,7 +39,7 @@ public:
   void clear();
   bool isEmpty()const{return m_shapes.isEmpty();}
   size_t size()const {return static_cast<size_t>(m_shapes.size());}
-  void select(size_t i);
+  void select(int i);
 
   QRectF getCurrentBoundingRect()const;
   void setCurrentBoundingRect(const QRectF& rect);
-- 
GitLab