Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
atlas
athena
Merge requests
!68773
GeoModelUtilities - Use GeoIntrusivePtr instead of GeoRef
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
GeoModelUtilities - Use GeoIntrusivePtr instead of GeoRef
jojungge/athena:ReplaceGeoRef
into
main
Overview
4
Commits
1
Pipelines
0
Changes
1
Merged
Johannes Junggeburth
requested to merge
jojungge/athena:ReplaceGeoRef
into
main
1 year ago
Overview
4
Commits
1
Pipelines
0
Changes
1
Expand
Needs
!68772 (merged)
Edited
1 year ago
by
Johannes Junggeburth
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
8ebf1386
1 commit,
1 year ago
1 file
+
2
−
100
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/GeoRef.h
+
2
−
100
Options
@@ -15,106 +15,8 @@
#ifndef GEOMODELUTILITIES_GEOREF_H
#define GEOMODELUTILITIES_GEOREF_H
#include
"GeoModelKernel/GeoIntrusivePtr.h"
template
<
class
T
>
class
GeoRef
{
public:
GeoRef
(
T
*
p
=
nullptr
)
noexcept
:
m_p
(
p
)
{
if
(
m_p
)
m_p
->
ref
();
}
~
GeoRef
()
noexcept
{
if
(
m_p
)
m_p
->
unref
();
}
GeoRef
(
const
GeoRef
&
o
)
noexcept
:
m_p
(
o
.
m_p
)
{
if
(
m_p
)
m_p
->
ref
();
}
template
<
class
U
>
GeoRef
(
GeoRef
<
U
>&
o
)
noexcept
:
m_p
(
o
.
get
())
{
if
(
m_p
)
m_p
->
ref
();
}
GeoRef
(
GeoRef
&&
o
)
noexcept
:
m_p
(
o
.
m_p
)
{
o
.
m_p
=
nullptr
;
}
GeoRef
&
operator
=
(
const
GeoRef
&
o
)
noexcept
{
if
(
this
!=
&
o
)
{
if
(
m_p
)
m_p
->
unref
();
m_p
=
o
.
m_p
;
if
(
m_p
)
m_p
->
ref
();
}
return
*
this
;
}
template
<
class
U
>
GeoRef
&
operator
=
(
GeoRef
<
U
>&
o
)
noexcept
{
if
(
m_p
)
m_p
->
unref
();
m_p
=
o
.
get
();
if
(
m_p
)
m_p
->
ref
();
return
*
this
;
}
GeoRef
&
operator
=
(
GeoRef
&&
o
)
noexcept
{
if
(
this
!=
&
o
)
{
if
(
m_p
)
m_p
->
unref
();
m_p
=
o
.
m_p
;
o
.
m_p
=
nullptr
;
}
return
*
this
;
}
operator
T
*
()
noexcept
{
return
m_p
;
}
T
*
get
()
noexcept
{
return
m_p
;
}
T
*
operator
->
()
noexcept
{
return
m_p
;
}
T
&
operator
*
()
noexcept
{
return
*
m_p
;
}
private
:
T
*
m_p
;
};
template
<
class
T
>
using
GeoRef
=
GeoIntrusivePtr
<
T
>
;
#endif // not GEOMODELUTILITIES_GEOREF_H
Loading