Skip to content
Snippets Groups Projects
Unverified Commit 7d7127bc authored by WHITFIELDRE email's avatar WHITFIELDRE email Committed by GitHub
Browse files

Merge pull request #23419 from mantidproject/23418-make_unique

fix conda build problem with direct calls of std::make_unique
parents 4868c633 0c1ae0b6
No related merge requests found
......@@ -3,6 +3,7 @@
#include "MantidDataHandling/DefaultEventLoader.h"
#include "MantidDataHandling/LoadEventNexus.h"
#include "MantidDataHandling/ProcessBankData.h"
#include "MantidKernel/make_unique.h"
namespace Mantid {
namespace DataHandling {
......@@ -188,7 +189,7 @@ LoadBankFromDiskTask::loadEventId(::NeXus::File &file) {
int64_t dim0 = recalculateDataSize(id_info.dims[0]);
// Now we allocate the required arrays
auto event_id = std::make_unique<uint32_t[]>(m_loadSize[0]);
auto event_id = Mantid::Kernel::make_unique<uint32_t[]>(m_loadSize[0]);
// Check that the required space is there in the file.
if (dim0 < m_loadSize[0] + m_loadStart[0]) {
......@@ -251,7 +252,8 @@ LoadBankFromDiskTask::loadEventId(::NeXus::File &file) {
*/
std::unique_ptr<float[]> LoadBankFromDiskTask::loadTof(::NeXus::File &file) {
// Allocate the array
auto event_time_of_flight = std::make_unique<float[]>(m_loadSize[0]);
auto event_time_of_flight =
Mantid::Kernel::make_unique<float[]>(m_loadSize[0]);
// Get the list of event_time_of_flight's
if (!m_oldNexusFileNames)
......@@ -314,7 +316,7 @@ LoadBankFromDiskTask::loadEventWeights(::NeXus::File &file) {
m_have_weight = true;
// Allocate the array
auto event_weight = std::make_unique<float[]>(m_loadSize[0]);
auto event_weight = Mantid::Kernel::make_unique<float[]>(m_loadSize[0]);
::NeXus::Info weight_info = file.getInfo();
int64_t weight_dim0 = recalculateDataSize(weight_info.dims[0]);
......
......@@ -5,16 +5,17 @@
#include "MantidGeometry/Instrument/ObjCompAssembly.h"
#include "MantidGeometry/Instrument/ReferenceFrame.h"
#include "MantidKernel/EigenConversionHelpers.h"
#include "MantidKernel/make_unique.h"
#include "MantidNexusGeometry/NexusShapeFactory.h"
#include <boost/make_shared.hpp>
#include <memory>
namespace Mantid {
namespace NexusGeometry {
/// Constructor
InstrumentBuilder::InstrumentBuilder(const std::string &instrumentName)
: m_instrument(std::make_unique<Geometry::Instrument>(instrumentName)) {
: m_instrument(
Mantid::Kernel::make_unique<Geometry::Instrument>(instrumentName)) {
// Default view
std::string defaultViewAxis = "z";
Geometry::PointingAlong pointingUp(Geometry::Y), alongBeam(Geometry::Z),
......@@ -160,7 +161,8 @@ std::unique_ptr<const Geometry::Instrument>
InstrumentBuilder::createInstrument() {
sortDetectors();
// Create the new replacement first incase it throws
auto temp = std::make_unique<Geometry::Instrument>(m_instrument->getName());
auto temp = Mantid::Kernel::make_unique<Geometry::Instrument>(
m_instrument->getName());
auto *product = m_instrument.release();
m_instrument = std::move(temp);
// Some older compilers (Apple clang 7) don't support copy construction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment