Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4284b0e2
Commit
4284b0e2
authored
May 16, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/ByteReverse: add "noexcept"
parent
9def9b35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
ByteReverse.cxx
src/util/ByteReverse.cxx
+9
-6
ByteReverse.hxx
src/util/ByteReverse.hxx
+7
-4
No files found.
src/util/ByteReverse.cxx
View file @
4284b0e2
...
...
@@ -25,7 +25,8 @@
void
reverse_bytes_16
(
uint16_t
*
gcc_restrict
dest
,
const
uint16_t
*
gcc_restrict
src
,
const
uint16_t
*
src_end
)
const
uint16_t
*
gcc_restrict
src
,
const
uint16_t
*
src_end
)
noexcept
{
assert
(
dest
!=
nullptr
);
assert
(
src
!=
nullptr
);
...
...
@@ -39,7 +40,8 @@ reverse_bytes_16(uint16_t *gcc_restrict dest,
void
reverse_bytes_32
(
uint32_t
*
gcc_restrict
dest
,
const
uint32_t
*
gcc_restrict
src
,
const
uint32_t
*
src_end
)
const
uint32_t
*
gcc_restrict
src
,
const
uint32_t
*
src_end
)
noexcept
{
assert
(
dest
!=
nullptr
);
assert
(
src
!=
nullptr
);
...
...
@@ -53,7 +55,8 @@ reverse_bytes_32(uint32_t *gcc_restrict dest,
void
reverse_bytes_64
(
uint64_t
*
gcc_restrict
dest
,
const
uint64_t
*
gcc_restrict
src
,
const
uint64_t
*
src_end
)
const
uint64_t
*
gcc_restrict
src
,
const
uint64_t
*
src_end
)
noexcept
{
assert
(
dest
!=
nullptr
);
assert
(
src
!=
nullptr
);
...
...
@@ -67,7 +70,7 @@ reverse_bytes_64(uint64_t *gcc_restrict dest,
static
void
reverse_bytes_linear
(
uint8_t
*
gcc_restrict
dest
,
const
uint8_t
*
gcc_restrict
src
,
size_t
n
)
const
uint8_t
*
gcc_restrict
src
,
size_t
n
)
noexcept
{
src
+=
n
;
...
...
@@ -78,7 +81,7 @@ reverse_bytes_linear(uint8_t *gcc_restrict dest,
static
void
reverse_bytes_generic
(
uint8_t
*
gcc_restrict
dest
,
const
uint8_t
*
gcc_restrict
src
,
const
uint8_t
*
src_end
,
size_t
frame_size
)
size_t
frame_size
)
noexcept
{
assert
(
dest
!=
nullptr
);
assert
(
src
!=
nullptr
);
...
...
@@ -96,7 +99,7 @@ reverse_bytes_generic(uint8_t *gcc_restrict dest,
void
reverse_bytes
(
uint8_t
*
gcc_restrict
dest
,
const
uint8_t
*
gcc_restrict
src
,
const
uint8_t
*
src_end
,
size_t
frame_size
)
size_t
frame_size
)
noexcept
{
assert
(
dest
!=
nullptr
);
assert
(
src
!=
nullptr
);
...
...
src/util/ByteReverse.hxx
View file @
4284b0e2
...
...
@@ -28,21 +28,24 @@
* used for in-place operation.
*/
void
reverse_bytes_16
(
uint16_t
*
dest
,
const
uint16_t
*
src
,
const
uint16_t
*
src_end
);
reverse_bytes_16
(
uint16_t
*
dest
,
const
uint16_t
*
src
,
const
uint16_t
*
src_end
)
noexcept
;
/**
* Reverse the bytes in each 32 bit "frame". This function can be
* used for in-place operation.
*/
void
reverse_bytes_32
(
uint32_t
*
dest
,
const
uint32_t
*
src
,
const
uint32_t
*
src_end
);
reverse_bytes_32
(
uint32_t
*
dest
,
const
uint32_t
*
src
,
const
uint32_t
*
src_end
)
noexcept
;
/**
* Reverse the bytes in each 64 bit "frame". This function can be
* used for in-place operation.
*/
void
reverse_bytes_64
(
uint64_t
*
dest
,
const
uint64_t
*
src
,
const
uint64_t
*
src_end
);
reverse_bytes_64
(
uint64_t
*
dest
,
const
uint64_t
*
src
,
const
uint64_t
*
src_end
)
noexcept
;
/**
* Reverse the bytes in each "frame". This function cannot be used
...
...
@@ -50,6 +53,6 @@ reverse_bytes_64(uint64_t *dest, const uint64_t *src, const uint64_t *src_end);
*/
void
reverse_bytes
(
uint8_t
*
dest
,
const
uint8_t
*
src
,
const
uint8_t
*
src_end
,
size_t
frame_size
);
size_t
frame_size
)
noexcept
;
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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