Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
7d7127bc
Unverified
Commit
7d7127bc
authored
6 years ago
by
WHITFIELDRE email
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #23419 from mantidproject/23418-make_unique
fix conda build problem with direct calls of std::make_unique
parents
4868c633
0c1ae0b6
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/DataHandling/src/LoadBankFromDiskTask.cpp
+5
-3
5 additions, 3 deletions
Framework/DataHandling/src/LoadBankFromDiskTask.cpp
Framework/NexusGeometry/src/InstrumentBuilder.cpp
+5
-3
5 additions, 3 deletions
Framework/NexusGeometry/src/InstrumentBuilder.cpp
with
10 additions
and
6 deletions
Framework/DataHandling/src/LoadBankFromDiskTask.cpp
+
5
−
3
View file @
7d7127bc
...
...
@@ -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
]);
...
...
This diff is collapsed.
Click to expand it.
Framework/NexusGeometry/src/InstrumentBuilder.cpp
+
5
−
3
View file @
7d7127bc
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment