Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
2c31e665
Commit
2c31e665
authored
Mar 16, 2017
by
Henry Weller
Browse files
autoPtr: Added assignment to pointer
parent
9d2ba297
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/memory/autoPtr/autoPtr.H
View file @
2c31e665
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
7
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -125,6 +125,9 @@ public:
//- Return const object pointer
inline
const
T
*
operator
->
()
const
;
//- Take over the object pointer from parameter
inline
void
operator
=
(
T
*
);
//- Take over the object pointer from parameter
inline
void
operator
=
(
const
autoPtr
<
T
>&
);
};
...
...
src/OpenFOAM/memory/autoPtr/autoPtrI.H
View file @
2c31e665
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
6
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
7
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -190,6 +190,13 @@ inline const T* Foam::autoPtr<T>::operator->() const
}
template
<
class
T
>
inline
void
Foam
::
autoPtr
<
T
>::
operator
=
(
T
*
p
)
{
reset
(
p
);
}
template
<
class
T
>
inline
void
Foam
::
autoPtr
<
T
>::
operator
=
(
const
autoPtr
<
T
>&
ap
)
{
...
...
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