Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
d59edd77
Commit
d59edd77
authored
May 04, 2020
by
Norby, Tom
Browse files
[Fortify] Unique pointer to raw.
parent
8c927e75
Pipeline
#100114
failed with stages
in 3 minutes and 18 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
radixio/arldatastream.cc
View file @
d59edd77
...
...
@@ -78,7 +78,7 @@ void ARLDataStream::expand(const std::string& val,
ARLDataStream
::
ARLDataStream
(
const
std
::
string
&
file
,
std
::
ios_base
::
openmode
mode
)
:
p
(
new
PImpl
()
,
[](
PImpl
*
impl
)
{
delete
impl
;
}
)
:
p
(
new
PImpl
())
{
p
->
file
=
file
;
p
->
stream
=
std
::
make_shared
<
radix
::
eafstream
>
(
p
->
file
.
c_str
(),
...
...
@@ -89,6 +89,8 @@ ARLDataStream::ARLDataStream(const std::string& file,
}
}
ARLDataStream
::~
ARLDataStream
()
{
delete
p
;
}
bool
ARLDataStream
::
read_record_header
(
ARLRecordHeader
&
rheader
)
{
bool
result
=
false
;
...
...
radixio/arldatastream.hh
View file @
d59edd77
...
...
@@ -22,8 +22,7 @@ class RADIX_PUBLIC ARLDataStream
{
// forward declare private implementation
class
PImpl
;
// unique pointer to private implmentation
std
::
unique_ptr
<
PImpl
,
void
(
*
)(
PImpl
*
)
>
p
;
PImpl
*
p
;
private:
/**
...
...
@@ -46,7 +45,7 @@ class RADIX_PUBLIC ARLDataStream
public:
ARLDataStream
()
=
delete
;
ARLDataStream
(
const
std
::
string
&
file
,
std
::
ios_base
::
openmode
mode
);
~
ARLDataStream
();
/**
* @brief read_index_header Reads a single index header from the stream
* @param iheader ARLIndexHeader&
...
...
radixio/eafstream.cc
View file @
d59edd77
...
...
@@ -110,7 +110,7 @@ eafstream &eafstream::operator>>(float &value)
eafstream
&
eafstream
::
operator
>>
(
std
::
vector
<
float
>
&
value
)
{
float
*
tData
;
tData
=
readFloatArray
(
(
int
)
value
.
size
());
tData
=
readFloatArray
(
value
.
size
());
std
::
copy
(
tData
,
tData
+
value
.
size
(),
value
.
begin
());
delete
[]
tData
;
return
*
this
;
...
...
radixio/f71stream.cc
View file @
d59edd77
...
...
@@ -48,12 +48,12 @@ class F71Case::PImpl
float
flux
;
};
F71Case
::
F71Case
()
:
p
(
new
PImpl
()
,
[](
PImpl
*
impl
)
{
delete
impl
;
}
)
:
p
(
new
PImpl
())
{
}
F71Case
::
F71Case
(
const
F71Case
&
orig
)
:
p
(
new
PImpl
()
,
[](
PImpl
*
impl
)
{
delete
impl
;
}
)
:
p
(
new
PImpl
())
{
p
->
light_element_nuclides
=
orig
.
p
->
light_element_nuclides
;
p
->
actinide_nuclides
=
orig
.
p
->
actinide_nuclides
;
...
...
@@ -92,6 +92,8 @@ F71Case::F71Case(const F71Case& orig)
p
->
flux
=
orig
.
p
->
flux
;
}
F71Case
::~
F71Case
()
{
delete
p
;
}
const
std
::
vector
<
int
>&
F71Case
::
lightElementNuclides
()
const
{
return
p
->
light_element_nuclides
;
...
...
radixio/f71stream.hh
View file @
d59edd77
...
...
@@ -76,12 +76,12 @@ class RADIX_PUBLIC F71Case
{
// forward declare private implementation
class
PImpl
;
// unique pointer to private implmentation
std
::
unique_ptr
<
PImpl
,
void
(
*
)(
PImpl
*
)
>
p
;
PImpl
*
p
;
public:
F71Case
();
F71Case
(
const
F71Case
&
orig
);
~
F71Case
();
const
std
::
vector
<
int
>&
lightElementNuclides
()
const
;
void
setLightElementNuclides
(
const
std
::
vector
<
int
>&
zaids
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment