Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
wiback
senf
Commits
cba5506c
Commit
cba5506c
authored
17 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
Utils: Fixed intrusive_refcount_t access implementation to conform to documentation
parent
5d489516
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Packets/PacketInterpreter.hh
+1
-1
1 addition, 1 deletion
Packets/PacketInterpreter.hh
Utils/intrusive_refcount.cti
+8
-8
8 additions, 8 deletions
Utils/intrusive_refcount.cti
Utils/intrusive_refcount.hh
+7
-9
7 additions, 9 deletions
Utils/intrusive_refcount.hh
with
16 additions
and
18 deletions
Packets/PacketInterpreter.hh
+
1
−
1
View file @
cba5506c
...
...
@@ -211,7 +211,7 @@ namespace senf {
void
releaseImpl
();
friend
class
detail
::
PacketImpl
;
friend
class
intrusive_refcount_
t
<
PacketInterpreterB
ase
>
;
friend
class
intrusive_refcount_
b
ase
;
template
<
class
PacketType
>
friend
class
PacketInterpreter
;
friend
class
detail
::
packet
::
test
::
TestDriver
;
friend
class
PacketParserBase
;
...
...
This diff is collapsed.
Click to expand it.
Utils/intrusive_refcount.cti
+
8
−
8
View file @
cba5506c
...
...
@@ -30,28 +30,28 @@
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
template <class S
elf
>
prefix_ void senf::intrusive_refcount_
t<Self>
::intrusive_ptr_add_ref()
template <class S>
prefix_ void senf::intrusive_refcount_
base
::intrusive_ptr_add_ref()
{
static_cast<S
elf
*>(this)->add_ref();
static_cast<S*>(this)->add_ref();
}
template <class S
elf
>
prefix_ void senf::intrusive_refcount_
t<Self>
::intrusive_ptr_release()
template <class S>
prefix_ void senf::intrusive_refcount_
base
::intrusive_ptr_release()
{
if (static_cast<S
elf
*>(this)->release()) delete this;
if (static_cast<S*>(this)->release()) delete this;
}
template <class Self>
prefix_ void senf::intrusive_ptr_add_ref(intrusive_refcount_t<Self>* p)
{
p->intrusive_ptr_add_ref();
p->intrusive_ptr_add_ref
<Self>
();
}
template <class Self>
prefix_ void senf::intrusive_ptr_release(intrusive_refcount_t<Self>* p)
{
p->intrusive_ptr_release();
p->intrusive_ptr_release
<Self>
();
}
template <class Self>
...
...
This diff is collapsed.
Click to expand it.
Utils/intrusive_refcount.hh
+
7
−
9
View file @
cba5506c
...
...
@@ -61,6 +61,13 @@ namespace senf {
private:
refcount_t
refcount_
;
template
<
class
S
>
void
intrusive_ptr_add_ref
();
template
<
class
S
>
void
intrusive_ptr_release
();
template
<
class
S
>
friend
void
senf
::
intrusive_ptr_add_ref
(
intrusive_refcount_t
<
S
>
*
p
);
template
<
class
S
>
friend
void
senf
::
intrusive_ptr_release
(
intrusive_refcount_t
<
S
>
*
p
);
};
/** \brief Customizable reference count mixin for intrusive_ptr
...
...
@@ -115,15 +122,6 @@ namespace senf {
{
protected:
intrusive_refcount_t
();
private:
void
intrusive_ptr_add_ref
();
void
intrusive_ptr_release
();
template
<
class
S
>
friend
void
senf
::
intrusive_ptr_add_ref
(
intrusive_refcount_t
<
S
>
*
p
);
template
<
class
S
>
friend
void
senf
::
intrusive_ptr_release
(
intrusive_refcount_t
<
S
>
*
p
);
};
/** \brief Reference count mixin for intrusive_ptr
...
...
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