From 1f2042a69c01ee25146c38af325b45febf9bf43c Mon Sep 17 00:00:00 2001
From: Martyn Gigg <martyn.gigg@stfc.ac.uk>
Date: Fri, 23 Oct 2015 17:37:10 +0100
Subject: [PATCH] Clear warnings in MantidPlot.

---
 MantidPlot/src/Mantid/MantidUI.cpp       |  2 +-
 MantidPlot/src/ScriptFileInterpreter.cpp | 24 ++++++++++++------------
 MantidPlot/src/ScriptFileInterpreter.h   |  8 ++++----
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/MantidPlot/src/Mantid/MantidUI.cpp b/MantidPlot/src/Mantid/MantidUI.cpp
index f6ddf9efda7..073759adef7 100644
--- a/MantidPlot/src/Mantid/MantidUI.cpp
+++ b/MantidPlot/src/Mantid/MantidUI.cpp
@@ -3617,7 +3617,7 @@ bool MantidUI::workspacesDockPlot1To1()
 
 struct mem_block
 {
-  int size;
+  SIZE_T size;
   int state;
 };
 
diff --git a/MantidPlot/src/ScriptFileInterpreter.cpp b/MantidPlot/src/ScriptFileInterpreter.cpp
index 40c4cb6539f..c0ae279689b 100644
--- a/MantidPlot/src/ScriptFileInterpreter.cpp
+++ b/MantidPlot/src/ScriptFileInterpreter.cpp
@@ -294,15 +294,15 @@ void ScriptFileInterpreter::emitZoomOut()
 }
 
 /**
- * Set up the widget from a given scripting environment
- * @param environ :: A pointer to the current scripting environment
+ * Set up the widget from a given scripting envment
+ * @param env :: A pointer to the current scripting envment
  * @param identifier :: A string identifier, used mainly in error messages to identify the
  * current script
  */
-void ScriptFileInterpreter::setup(const ScriptingEnv & environ, const QString & identifier)
+void ScriptFileInterpreter::setup(const ScriptingEnv & env, const QString & identifier)
 {
-  setupEditor(environ, identifier);
-  setupScriptRunner(environ, identifier);
+  setupEditor(env, identifier);
+  setupScriptRunner(env, identifier);
   connect(m_runner.data(), SIGNAL(autoCompleteListGenerated(const QStringList &)),
           m_editor, SLOT(updateCompletionAPI(const QStringList &)));
   m_runner->generateAutoCompleteList();
@@ -443,7 +443,7 @@ void ScriptFileInterpreter::executeSelection(const Script::ExecutionMode mode)
 }
 
 /**
- * The environment has to support this behaviour or is does nothing
+ * The envment has to support this behaviour or is does nothing
  */
 void ScriptFileInterpreter::abort() {
   m_runner->abort();
@@ -501,17 +501,17 @@ void ScriptFileInterpreter::setupChildWidgets()
 }
 
 /**
- * @param environ :: A pointer to the current scripting environment
+ * @param env :: A pointer to the current scripting envment
  * @param identifier :: A string identifier, used mainly in error messages to identify the
  * current script
  */
-void ScriptFileInterpreter::setupEditor(const ScriptingEnv & environ, const QString & identifier)
+void ScriptFileInterpreter::setupEditor(const ScriptingEnv & env, const QString & identifier)
 {
   if(QFileInfo(identifier).exists())
   {
     readFileIntoEditor(identifier);
   }
-  m_editor->setLexer(environ.createCodeLexer());
+  m_editor->setLexer(env.createCodeLexer());
   m_editor->setSettingsGroup("ScriptWindow");
   m_editor->padMargin();
   m_editor->setAutoMarginResize();
@@ -525,13 +525,13 @@ void ScriptFileInterpreter::setupEditor(const ScriptingEnv & environ, const QStr
 }
 
 /**
- * @param environ :: A pointer to the current scripting environment
+ * @param env :: A pointer to the current scripting envment
  * @param identifier :: A string identifier, used mainly in error messages to identify the
  * current script
  */
-void ScriptFileInterpreter::setupScriptRunner(const ScriptingEnv & environ, const QString & identifier)
+void ScriptFileInterpreter::setupScriptRunner(const ScriptingEnv & env, const QString & identifier)
 {
-  m_runner = QSharedPointer<Script>(environ.newScript(identifier,this, Script::Interactive));
+  m_runner = QSharedPointer<Script>(env.newScript(identifier,this, Script::Interactive));
 
   connect(m_runner.data(), SIGNAL(started(const QString &)), this, SLOT(setExecutingStatus()));
   connect(m_runner.data(), SIGNAL(started(const QString &)), m_messages, SLOT(displayMessageWithTimestamp(const QString &)));
diff --git a/MantidPlot/src/ScriptFileInterpreter.h b/MantidPlot/src/ScriptFileInterpreter.h
index a80b4eb0db0..391322c4443 100644
--- a/MantidPlot/src/ScriptFileInterpreter.h
+++ b/MantidPlot/src/ScriptFileInterpreter.h
@@ -37,8 +37,8 @@ public:
   ~ScriptFileInterpreter();
   /// Determine if the script is ready to be closed
   virtual bool shouldClose();
-  /// Setup from a script environment
-  virtual void setup(const ScriptingEnv & environ, const QString & identifier);
+  /// Setup from a script envment
+  virtual void setup(const ScriptingEnv & env, const QString & identifier);
 
   /// Return the filename of the script in the editor
   virtual QString filename() const;
@@ -145,8 +145,8 @@ private:
   Q_DISABLE_COPY(ScriptFileInterpreter)
   void setupChildWidgets();
 
-  void setupEditor(const ScriptingEnv & environ, const QString & identifier);
-  void setupScriptRunner(const ScriptingEnv & environ, const QString & identifier);
+  void setupEditor(const ScriptingEnv & env, const QString & identifier);
+  void setupScriptRunner(const ScriptingEnv & env, const QString & identifier);
 
   bool readFileIntoEditor(const QString & filename);
   void executeCode(const ScriptCode & code, const Script::ExecutionMode mode);
-- 
GitLab