Commit 3231531b authored by Sam Jenkins's avatar Sam Jenkins
Browse files

Re #25308 removed <iostream> from Framework/Api

parent c1960592
......@@ -216,10 +216,10 @@ private:
* @return True if it is true
*/
bool is_op_symbol(const char c) const;
boost::shared_ptr<Operators> m_operators; ///< pointer ot the operators
boost::shared_ptr<Operators> m_operators; ///< pointer ot the operators
};
} // namespace API
} // namespace Mantid
......
......@@ -4,12 +4,12 @@
// NScD Oak Ridge National Laboratory, European Spallation Source
// & Institut Laue - Langevin
// SPDX - License - Identifier: GPL - 3.0 +
#include <iostream>
#include <locale>
#include <sstream>
#include "MantidAPI/Expression.h"
#include "MantidKernel/Logger.h"
#include <MantidKernel/StringTokenizer.h>
namespace Mantid {
......@@ -21,7 +21,6 @@ const std::string DEFAULT_OPS_STR[] = {
";", ",", "=", "== != > < <= >=", "&& || ^^", "+ -", "* /", "^"};
const std::string EMPTY_EXPRESSION_NAME = "EMPTY";
namespace {
/// Make the full text of the error message
/// @param msg :: The text of the error message.
......@@ -55,6 +54,9 @@ std::string makeErrorMessage(const std::string &msg, const std::string &expr,
return res.str();
}
// Get a reference to the logger
Kernel::Logger logger("Expression");
} // namespace
/// Constructor
......@@ -72,7 +74,6 @@ Expression::ParsingError::ParsingError(const std::string &msg)
: std::runtime_error(msg) {}
Expression::Expression() {
m_operators.reset(new Operators());
// Define binary operators. Put them in the reverse precedence order (from
// lower to higher prec.)
......@@ -413,12 +414,12 @@ std::string Expression::GetOp(size_t i) {
void Expression::logPrint(const std::string &pads) const {
std::string myPads = pads + " ";
if (!m_terms.empty()) {
std::cerr << myPads << m_op << '[' << m_funct << ']' << "(\n";
logger.debug() << myPads << m_op << '[' << m_funct << ']' << "(\n";
for (const auto &term : m_terms)
term.logPrint(myPads);
std::cerr << myPads << ")\n";
logger.debug() << myPads << ")\n";
} else
std::cerr << myPads << m_op << m_funct << '\n';
logger.debug() << myPads << m_op << m_funct << '\n';
}
void Expression::setFunct(const std::string &name) {
......
......@@ -10,7 +10,6 @@
#include <cxxtest/TestSuite.h>
#include "MantidAPI/Expression.h"
#include <iostream>
using namespace Mantid;
using namespace Mantid::API;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment