Commit e6e520f8 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Use to_string instead of lexical_cast.

parent 085529ef
......@@ -171,8 +171,7 @@ void SaveISISNexus::exec() {
saveChar("title", m_isisRaw->r_title, 80);
saveInt("good_frames", &m_isisRaw->rpb.r_goodfrm);
std::string experiment_identifier =
boost::lexical_cast<std::string>(m_isisRaw->rpb.r_prop);
std::string experiment_identifier = std::to_string(m_isisRaw->rpb.r_prop);
saveChar("experiment_identifier", &experiment_identifier[0],
static_cast<int>(experiment_identifier.size()));
int tmp_int(0);
......
......@@ -173,7 +173,7 @@ std::string SaveOpenGenieAscii::getAxisHeader(const std::string alpha,
outStr += twospc + singleSpc + alpha + "\n";
outStr += fourspc + GXR + "\n";
outStr += fourspc + banknum + "\n";
outStr += fourspc + boost::lexical_cast<std::string>(nBins) + "\n";
outStr += fourspc + std::to_string(nBins) + "\n";
return outStr;
}
......@@ -332,7 +332,7 @@ void SaveOpenGenieAscii::addNtc(const std::string fourspc, int nBins) {
std::string ntc = "ntc";
outStr += (" \"" + ntc + "\"" + "\n" + fourspc + "Integer" + "\n" + fourspc +
boost::lexical_cast<std::string>(nBins) + "\n");
std::to_string(nBins) + "\n");
logVector.push_back(outStr);
}
......
......@@ -181,8 +181,7 @@ void SaveSavuTomoConfig::saveFile(
// std::string cite = w->cell<std::string>(ti, 3);
// but in the file it goes as: data (params), id, name
nxFile.makeGroup(boost::lexical_cast<std::string>(procCount++), "NXnote",
true);
nxFile.makeGroup(std::to_string(procCount++), "NXnote", true);
nxFile.writeData("data", params);
nxFile.writeData("id", id);
nxFile.writeData("name", name);
......
......@@ -306,8 +306,8 @@ PeaksWorkspace::peakInfo(Kernel::V3D qFrame, bool labCoords) const {
}
if (hasOneRunNumber) {
std::pair<std::string, std::string> runn(
"RunNumber", " " + boost::lexical_cast<std::string>(runNum));
std::pair<std::string, std::string> runn("RunNumber",
" " + std::to_string(runNum));
Result.push_back(runn);
}
......@@ -321,7 +321,7 @@ PeaksWorkspace::peakInfo(Kernel::V3D qFrame, bool labCoords) const {
Result.push_back(GRead);
std::pair<std::string, std::string> SeqNum(
"Seq Num,1st=1", " " + boost::lexical_cast<std::string>(seqNum + 1));
"Seq Num,1st=1", " " + std::to_string(seqNum + 1));
Result.push_back(SeqNum);
oss << std::setw(12) << std::fixed << std::setprecision(3)
......@@ -352,11 +352,11 @@ PeaksWorkspace::peakInfo(Kernel::V3D qFrame, bool labCoords) const {
oss.clear();
std::pair<std::string, std::string> row(
"Row", " " + boost::lexical_cast<std::string>(peak->getRow()));
"Row", " " + std::to_string(peak->getRow()));
Result.push_back(row);
std::pair<std::string, std::string> col(
"Col", " " + boost::lexical_cast<std::string>(peak->getCol()));
"Col", " " + std::to_string(peak->getCol()));
Result.push_back(col);
std::pair<std::string, std::string> bank("Bank",
......
......@@ -209,17 +209,17 @@ void Workspace2D::setImageYAndE(const API::MantidImage &imageY,
throw std::runtime_error(
std::string("To load an image into a workspace with one spectrum per "
"row, then number of spectra (") +
boost::lexical_cast<std::string>(getNumberHistograms()) +
std::to_string(getNumberHistograms()) +
") needs to be equal to the height (rows) of the image (" +
boost::lexical_cast<std::string>(height) + ")");
std::to_string(height) + ")");
if (width != blocksize())
throw std::runtime_error(
std::string("To load an image into a workspace with one spectrum per "
"row, then number of bins (") +
boost::lexical_cast<std::string>(blocksize()) +
std::to_string(blocksize()) +
") needs to be equal to the width (columns) of the image (" +
boost::lexical_cast<std::string>(width) + ")");
std::to_string(width) + ")");
// one spectrum - one row
PARALLEL_FOR_IF(parallelExecution)
......
......@@ -247,14 +247,14 @@ std::string SymmetryElementRotationGenerator::determineSymbol(
symbol += "-";
}
symbol += boost::lexical_cast<std::string>(operation.order());
symbol += std::to_string(operation.order());
int translation =
static_cast<int>(static_cast<double>(operation.order()) *
Kernel::V3D(determineTranslation(operation)).norm());
if (translation != 0) {
symbol += boost::lexical_cast<std::string>(translation);
symbol += std::to_string(translation);
}
return symbol;
......
......@@ -43,7 +43,7 @@ void moveComponent(const IComponent &comp, ParameterMap &pmap,
break;
default:
throw std::invalid_argument("moveComponent - Unknown positionType: " +
boost::lexical_cast<std::string>(positionType));
std::to_string(positionType));
}
// Then find the corresponding relative position
......@@ -89,7 +89,7 @@ void rotateComponent(const IComponent &comp, ParameterMap &pmap,
newRot = Rot0 * rot;
} else {
throw std::invalid_argument("rotateComponent - Unknown rotType: " +
boost::lexical_cast<std::string>(rotType));
std::to_string(rotType));
}
// Add a parameter for the new rotation
......
......@@ -2841,8 +2841,7 @@ InstrumentDefinitionParser::convertLocationsElement(
if (!name.empty()) {
// Add name with appropriate numeric postfix
pLoc->setAttribute(
"name", name + boost::lexical_cast<std::string>(nameCountStart + i));
pLoc->setAttribute("name", name + std::to_string(nameCountStart + i));
}
// Copy values of all the attributes set
......
......@@ -193,8 +193,8 @@ const std::string ParameterMap::diff(const ParameterMap &rhs,
// Quick size check
if (this->size() != rhs.size()) {
return std::string("Number of parameters does not match: ") +
boost::lexical_cast<std::string>(this->size()) + " not equal to " +
boost::lexical_cast<std::string>(rhs.size());
std::to_string(this->size()) + " not equal to " +
std::to_string(rhs.size());
}
// Run this same loops as in operator==
......
......@@ -83,7 +83,7 @@ void CICatHelper::saveInvestigations(
for (citr = investigations.begin(); citr != investigations.end(); ++citr) {
API::TableRow t = outputws->appendRow();
std::string id = boost::lexical_cast<std::string>(*(*citr)->id);
std::string id = std::to_string(*(*citr)->id);
savetoTableWorkspace(&id, t);
savetoTableWorkspace((*citr)->facility, t);
......@@ -91,12 +91,10 @@ void CICatHelper::saveInvestigations(
savetoTableWorkspace((*citr)->instrument, t);
savetoTableWorkspace((*citr)->invParamValue, t);
std::string startDate =
boost::lexical_cast<std::string>(*(*citr)->invStartDate);
std::string startDate = std::to_string(*(*citr)->invStartDate);
savetoTableWorkspace(&startDate, t);
std::string endDate =
boost::lexical_cast<std::string>(*(*citr)->invEndDate);
std::string endDate = std::to_string(*(*citr)->invEndDate);
savetoTableWorkspace(&endDate, t);
std::string sessionID = m_session->getSessionId();
......
......@@ -273,8 +273,8 @@ void ICat4Catalog::search(const CatalogSearchParam &inputs,
// Modify the query to include correct SELECT and LIMIT clauses.
query.insert(0, "SELECT DISTINCT inves");
query.append(" LIMIT " + boost::lexical_cast<std::string>(offset) + "," +
boost::lexical_cast<std::string>(limit));
query.append(" LIMIT " + std::to_string(offset) + "," +
std::to_string(limit));
ICATPortBindingProxy icat;
setICATProxySettings(icat);
......@@ -585,8 +585,7 @@ const std::string ICat4Catalog::getFileLocation(const long long &fileID) {
setICATProxySettings(icat);
auto searchResults =
performSearch(icat, "Datafile[id = '" +
boost::lexical_cast<std::string>(fileID) + "']");
performSearch(icat, "Datafile[id = '" + std::to_string(fileID) + "']");
auto datafile = dynamic_cast<ns1__datafile *>(searchResults.at(0));
if (datafile && datafile->location)
......@@ -609,9 +608,8 @@ const std::string ICat4Catalog::getDownloadURL(const long long &fileID) {
// Set the REST features of the URL.
std::string session = "sessionId=" + m_session->getSessionId();
std::string datafile =
"&datafileIds=" + boost::lexical_cast<std::string>(fileID);
std::string outname = "&outname=" + boost::lexical_cast<std::string>(fileID);
std::string datafile = "&datafileIds=" + std::to_string(fileID);
std::string outname = "&outname=" + std::to_string(fileID);
// Add all the REST pieces to the URL.
url += ("getData?" + session + datafile + outname + "&zip=false");
......@@ -642,8 +640,7 @@ ICat4Catalog::getUploadURL(const std::string &investigationID,
std::string session = "sessionId=" + m_session->getSessionId();
std::string name = "&name=" + createFileName;
std::string datasetId =
"&datasetId=" +
boost::lexical_cast<std::string>(getMantidDatasetId(investigationID));
"&datasetId=" + std::to_string(getMantidDatasetId(investigationID));
std::string description = "&description=" + dataFileDescription;
// Add pieces of URL together.
......@@ -772,7 +769,7 @@ std::string ICat4Catalog::bytesToString(int64_t &fileSize) {
fileSize = fileSize / 1024;
}
return boost::lexical_cast<std::string>(fileSize) + units.at(order);
return std::to_string(fileSize) + units.at(order);
}
/**
......
......@@ -694,14 +694,14 @@ std::string pad(unsigned int run, const std::string &instString) {
InstrumentInfo instInfo = ConfigService::Instance().getInstrument(instString);
std::string prefix = instInfo.filePrefix(run) + instInfo.delimiter();
unsigned int padLength = instInfo.zeroPadding(run);
std::string runStr = boost::lexical_cast<std::string>(run);
std::string runStr = std::to_string(run);
if (runStr.size() < padLength)
runStr.insert(0, padLength - runStr.size(), '0');
else if (padLength > 0 && runStr.size() > padLength)
throw std::runtime_error(
"Could not parse run number \"" + runStr +
"\" since the instrument run number length required is " +
boost::lexical_cast<std::string>(padLength));
std::to_string(padLength));
runStr.insert(0, prefix);
return runStr;
}
......@@ -773,10 +773,10 @@ std::string &accumulateString(std::string &output,
output += "_and_";
if (runRange.first == runRange.second)
output += boost::lexical_cast<std::string>(runRange.first);
output += std::to_string(runRange.first);
else
output += boost::lexical_cast<std::string>(runRange.first) + "_to_" +
boost::lexical_cast<std::string>(runRange.second);
output += std::to_string(runRange.first) + "_to_" +
std::to_string(runRange.second);
return output;
}
......
......@@ -60,9 +60,9 @@ bool PropertyHistory::isEmptyDefault() const {
}
// Empty values
if (emptyValues.empty()) {
emptyValues.push_back(boost::lexical_cast<std::string>(EMPTY_INT()));
emptyValues.push_back(std::to_string(EMPTY_INT()));
emptyValues.push_back(boost::lexical_cast<std::string>(EMPTY_DBL()));
emptyValues.push_back(boost::lexical_cast<std::string>(EMPTY_LONG()));
emptyValues.push_back(std::to_string(EMPTY_LONG()));
}
// If default, input, number type and matches empty value then return true
......
......@@ -115,7 +115,7 @@ double UnitConversion::convertViaTOF(Unit &srcUnit, Unit &destUnit,
default:
throw std::invalid_argument(
"UnitConversion::convertViaTOF - Unknown emode " +
boost::lexical_cast<std::string>(emode));
std::to_string(emode));
};
const double unused(0.0);
......
......@@ -570,13 +570,13 @@ BeamMonitorConfigPkt::BeamMonitorConfigPkt(const uint8_t *data, uint32_t len)
if (m_version == 0x00 &&
m_payload_len != (sizeof(uint32_t) + (beamMonCount() * sectionSize))) {
std::string msg("BeamMonitorConfig V0 packet is incorrect length: ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
} else if (m_version > ADARA::PacketType::BEAM_MONITOR_CONFIG_VERSION &&
m_payload_len <
(sizeof(uint32_t) + (beamMonCount() * sectionSize))) {
std::string msg("Newer BeamMonitorConfig packet is too short: ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
}
}
......@@ -595,12 +595,12 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
if (m_version == 0x00 && m_payload_len < sizeof(uint32_t)) {
std::string msg("DetectorBankSets V0 packet is too short for Count! ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
} else if (m_version > ADARA::PacketType::DETECTOR_BANK_SETS_VERSION &&
m_payload_len < sizeof(uint32_t)) {
std::string msg("Newer DetectorBankSets packet is too short for Count! ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
}
......@@ -638,15 +638,15 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
m_payload_len <
((sectionOffset + baseSectionOffsetNoBanks) * sizeof(uint32_t))) {
std::string msg("DetectorBankSets V0 packet: too short for Set ");
msg += boost::lexical_cast<std::string>(i + 1);
msg += std::to_string(i + 1);
msg += " of ";
msg += boost::lexical_cast<std::string>(numSets);
msg += std::to_string(numSets);
msg += " sectionOffset=";
msg += boost::lexical_cast<std::string>(sectionOffset);
msg += std::to_string(sectionOffset);
msg += " baseSectionOffsetNoBanks=";
msg += boost::lexical_cast<std::string>(baseSectionOffsetNoBanks);
msg += std::to_string(baseSectionOffsetNoBanks);
msg += " payload_len=";
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
delete[] m_sectionOffsets;
m_sectionOffsets = nullptr;
delete[] m_after_banks_offset;
......@@ -656,15 +656,15 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
m_payload_len < ((sectionOffset + baseSectionOffsetNoBanks) *
sizeof(uint32_t))) {
std::string msg("Newer DetectorBankSets packet: too short for Set ");
msg += boost::lexical_cast<std::string>(i + 1);
msg += std::to_string(i + 1);
msg += " of ";
msg += boost::lexical_cast<std::string>(numSets);
msg += std::to_string(numSets);
msg += " sectionOffset=";
msg += boost::lexical_cast<std::string>(sectionOffset);
msg += std::to_string(sectionOffset);
msg += " baseSectionOffsetNoBanks=";
msg += boost::lexical_cast<std::string>(baseSectionOffsetNoBanks);
msg += std::to_string(baseSectionOffsetNoBanks);
msg += " payload_len=";
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
delete[] m_sectionOffsets;
m_sectionOffsets = nullptr;
delete[] m_after_banks_offset;
......@@ -687,13 +687,13 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
if (m_version == 0x00 && m_payload_len < (sectionOffset * sizeof(uint32_t))) {
std::string msg("DetectorBankSets V0 packet: overall too short ");
msg += " numSets=";
msg += boost::lexical_cast<std::string>(numSets);
msg += std::to_string(numSets);
msg += " baseSectionOffsetNoBanks=";
msg += boost::lexical_cast<std::string>(baseSectionOffsetNoBanks);
msg += std::to_string(baseSectionOffsetNoBanks);
msg += " final sectionOffset=";
msg += boost::lexical_cast<std::string>(sectionOffset);
msg += std::to_string(sectionOffset);
msg += " payload_len=";
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
delete[] m_sectionOffsets;
m_sectionOffsets = nullptr;
delete[] m_after_banks_offset;
......@@ -703,13 +703,13 @@ DetectorBankSetsPkt::DetectorBankSetsPkt(const uint8_t *data, uint32_t len)
m_payload_len < (sectionOffset * sizeof(uint32_t))) {
std::string msg("Newer DetectorBankSets packet: overall too short ");
msg += " numSets=";
msg += boost::lexical_cast<std::string>(numSets);
msg += std::to_string(numSets);
msg += " baseSectionOffsetNoBanks=";
msg += boost::lexical_cast<std::string>(baseSectionOffsetNoBanks);
msg += std::to_string(baseSectionOffsetNoBanks);
msg += " final sectionOffset=";
msg += boost::lexical_cast<std::string>(sectionOffset);
msg += std::to_string(sectionOffset);
msg += " payload_len=";
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
delete[] m_sectionOffsets;
m_sectionOffsets = nullptr;
delete[] m_after_banks_offset;
......@@ -788,24 +788,24 @@ VariableU32Pkt::VariableU32Pkt(const uint8_t *data, uint32_t len)
m_fields(reinterpret_cast<const uint32_t *>(payload())) {
if (m_version == 0x00 && m_payload_len != (4 * sizeof(uint32_t))) {
std::string msg("VariableValue (U32) V0 packet is incorrect length: ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
} else if (m_version > ADARA::PacketType::VAR_VALUE_U32_VERSION &&
m_payload_len < (4 * sizeof(uint32_t))) {
std::string msg("Newer VariableValue (U32) packet is too short: ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
}
if (validate_status(status())) {
std::string msg("VariableValue (U32) packet has invalid status: ");
msg += boost::lexical_cast<std::string>(status());
msg += std::to_string(status());
throw invalid_packet(msg);
}
if (validate_severity(severity())) {
std::string msg("VariableValue (U32) packet has invalid severity: ");
msg += boost::lexical_cast<std::string>(severity());
msg += std::to_string(severity());
throw invalid_packet(msg);
}
}
......@@ -821,24 +821,24 @@ VariableDoublePkt::VariableDoublePkt(const uint8_t *data, uint32_t len)
if (m_version == 0x00 &&
m_payload_len != (sizeof(double) + (3 * sizeof(uint32_t)))) {
std::string msg("VariableValue (Double) V0 packet is incorrect length: ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
} else if (m_version > ADARA::PacketType::VAR_VALUE_DOUBLE_VERSION &&
m_payload_len < (sizeof(double) + (3 * sizeof(uint32_t)))) {
std::string msg("Newer VariableValue (Double) packet is too short: ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
}
if (validate_status(status())) {
std::string msg("VariableValue (double) packet has invalid status: ");
msg += boost::lexical_cast<std::string>(status());
msg += std::to_string(status());
throw invalid_packet(msg);
}
if (validate_severity(severity())) {
std::string msg("VariableValue (double) packet has invalid severity: ");
msg += boost::lexical_cast<std::string>(severity());
msg += std::to_string(severity());
throw invalid_packet(msg);
}
}
......@@ -855,41 +855,41 @@ VariableStringPkt::VariableStringPkt(const uint8_t *data, uint32_t len)
if (m_version == 0x00 && m_payload_len < (4 * sizeof(uint32_t))) {
std::string msg("VariableValue (String) V0 packet is too short ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
} else if (m_version > ADARA::PacketType::VAR_VALUE_STRING_VERSION &&
m_payload_len < (4 * sizeof(uint32_t))) {
std::string msg("Newer VariableValue (String) packet is too short ");
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
}
size = m_fields[3];
if (m_version == 0x00 && m_payload_len < (size + (4 * sizeof(uint32_t)))) {
std::string msg("VariableValue (String) V0 packet has oversize string: ");
msg += boost::lexical_cast<std::string>(size);
msg += std::to_string(size);
msg += " vs payload ";
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
} else if (m_version > ADARA::PacketType::VAR_VALUE_STRING_VERSION &&
m_payload_len < (size + (4 * sizeof(uint32_t)))) {
std::string msg(
"Newer VariableValue (String) packet has oversize string: ");
msg += boost::lexical_cast<std::string>(size);
msg += std::to_string(size);
msg += " vs payload ";
msg += boost::lexical_cast<std::string>(m_payload_len);
msg += std::to_string(m_payload_len);
throw invalid_packet(msg);
}
if (validate_status(status())) {
std::string msg("VariableValue (string) packet has invalid status: ");
msg += boost::lexical_cast<std::string>(status());
msg += std::to_string(status());
throw invalid_packet(msg);
}
if (validate_severity(severity())) {
std::string msg("VariableValue (string) packet has invalid severity: ");
msg += boost::lexical_cast<std::string>(severity());
msg += std::to_string(severity());
throw invalid_packet(msg);
}
......
......@@ -308,9 +308,8 @@ void ISISHistoDataListener::setPeriods(
m_periodList = periodList;
if (*std::max_element(m_periodList.begin(), m_periodList.end()) >
m_numberOfPeriods) {
throw std::invalid_argument(
"Invalid period(s) specified. Maximum " +
boost::lexical_cast<std::string>(m_numberOfPeriods));
throw std::invalid_argument("Invalid period(s) specified. Maximum " +
std::to_string(m_numberOfPeriods));
}
}
}
......@@ -509,7 +508,7 @@ void ISISHistoDataListener::loadTimeRegimes() {
// If there is nonzero number of time channels for the second one then we have
// two regimes.
for (size_t tr = 0; tr < 2; ++tr) {
const std::string regime = boost::lexical_cast<std::string>(tr + 1);
const std::string regime = std::to_string(tr + 1);
// get number of bins in this regime
int nbins = getInt(ntcPrefix + regime);
if (nbins == 0) {
......@@ -559,8 +558,7 @@ void ISISHistoDataListener::loadTimeRegimes() {
}
const std::string detRTCB =
rtcbPrefix + "_" +
boost::lexical_cast<std::string>(m_monitorSpectra.front());
rtcbPrefix + "_" + std::to_string(m_monitorSpectra.front());
// read in the bin boundaries
getFloatArray(detRTCB, floatBuffer, nbins + 1);
}
......@@ -610,7 +608,7 @@ int ISISHistoDataListener::getTimeRegimeToLoad() const {
m_monitorSpectra.end();
if (!isMonitor && specIt > m_totalNumberOfSpectra)
throw std::invalid_argument("Invalid spectra index is found: " +
boost::lexical_cast<std::string>(specIt));
std::to_string(specIt));
int specRegime = isMonitor ? 1 : 0;
if (regime < 0) {
regime = specRegime;
......
......@@ -343,7 +343,7 @@ void ISISLiveEventDataListener::initEventBuffer(
// Set the run number
m_runNumber = setup.head_setup.run_number;
std::string run_num = boost::lexical_cast<std::string>(m_runNumber);
std::string run_num = std::to_string(m_runNumber);
m_eventBuffer[0]->mutableRun().addLogData(
new Mantid::Kernel::PropertyWithValue<std::string>(RUN_NUMBER_PROPERTY,
run_num));
......
......@@ -560,8 +560,8 @@ void LoadLiveData::exec() {
for (size_t i = 0; i < n; ++i) {
auto ws = out_gws->getItem(i);
std::string itemName = ws->name();
std::string wsName = getPropertyValue("OutputWorkspace") + "_" +
boost::lexical_cast<std::string>(i + 1);
std::string wsName =
getPropertyValue("OutputWorkspace") + "_" + std::to_string(i + 1);
if (wsName != itemName) {
if (AnalysisDataService::Instance().doesExist(itemName)) {
// replace the temporary name with the proper one
......
......@@ -135,8 +135,7 @@ void CompactMD::exec() {
// setting property PxBin depending on the number of dimensions the
// input workspace has.
for (size_t iter = 0; iter < input_ws->getNumDims(); iter++) {
std::string propertyString =
"P" + boost::lexical_cast<std::string>(iter + 1) + "Bin";
std::string propertyString = "P" + std::to_string(iter + 1) + "Bin";