From b080f74211c36b42147d6abce9c376c0d66465a9 Mon Sep 17 00:00:00 2001
From: Samuel Jones <samjones714@gmail.com>
Date: Mon, 5 Nov 2018 14:55:47 +0000
Subject: [PATCH] Re #23570 Sort out casting to ints

---
 MantidPlot/src/ProjectRecovery.cpp                           | 5 +++--
 .../src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp     | 2 +-
 .../src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h       | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/MantidPlot/src/ProjectRecovery.cpp b/MantidPlot/src/ProjectRecovery.cpp
index 9fc74f7c378..243e4651252 100644
--- a/MantidPlot/src/ProjectRecovery.cpp
+++ b/MantidPlot/src/ProjectRecovery.cpp
@@ -497,8 +497,9 @@ void ProjectRecovery::openInEditor(const Poco::Path &inputFolder,
 
   // Get length of recovery script
   std::ifstream fileCount(historyDest.toString());
-  auto lineLength = std::count(std::istreambuf_iterator<char>(fileCount),
-                               std::istreambuf_iterator<char>(), '\n');
+  int lineLength =
+      static_cast<int>(std::count(std::istreambuf_iterator<char>(fileCount),
+                                  std::istreambuf_iterator<char>(), '\n'));
   fileCount.close();
 
   // Update Progress bar
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp
index c8bb1b2af08..f6779ab1f70 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.cpp
@@ -150,7 +150,7 @@ operator=(const ProjectRecoveryPresenter &obj) {
   return *this;
 }
 
-void ProjectRecoveryPresenter::setUpProgressBar(size_t barMax) {
+void ProjectRecoveryPresenter::setUpProgressBar(int barMax) {
   if (m_openView == RecoveryView && m_recView) {
     m_recView->setProgressBarMaximum(barMax);
   } else if (m_failureView) {
diff --git a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
index 3ae42ea80cf..0b7d4e5890f 100644
--- a/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
+++ b/MantidPlot/src/ProjectRecoveryGUIs/ProjectRecoveryPresenter.h
@@ -41,7 +41,7 @@ public:
   void emitAbortScript();
   void changeStartMantidToCancelLabel();
   void fillAllRows();
-  void setUpProgressBar(size_t barMax);
+  void setUpProgressBar(int barMax);
 
 private:
   friend class ProjectRecoveryView;
-- 
GitLab