Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
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
savoirfairelinux
opendht
Commits
c647b19e
Commit
c647b19e
authored
6 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
infohash: make some methods constexpr, noexcept
parent
8cd14646
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/opendht/infohash.h
+2
-2
2 additions, 2 deletions
include/opendht/infohash.h
with
2 additions
and
2 deletions
include/opendht/infohash.h
+
2
−
2
View file @
c647b19e
...
...
@@ -65,7 +65,7 @@ public:
typedef
typename
T
::
iterator
iterator
;
typedef
typename
T
::
const_iterator
const_iterator
;
Hash
()
{
Hash
()
noexcept
{
data_
.
fill
(
0
);
}
Hash
(
const
uint8_t
*
h
,
size_t
data_len
)
{
...
...
@@ -85,7 +85,7 @@ public:
msgpack_unpack
(
o
);
}
size_t
size
()
const
{
return
data_
.
size
();
}
constexpr
size_t
size
()
const
noexcept
{
return
data_
.
size
();
}
const
uint8_t
*
data
()
const
{
return
data_
.
data
();
}
uint8_t
*
data
()
{
return
data_
.
data
();
}
iterator
begin
()
{
return
data_
.
begin
();
}
...
...
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