Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
5b6d6bec
Commit
5b6d6bec
authored
Nov 07, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formatting
parent
c3eb1365
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
libcaf_net/caf/net/operation.hpp
libcaf_net/caf/net/operation.hpp
+2
-2
libcaf_net/test/net/operation.cpp
libcaf_net/test/net/operation.cpp
+1
-1
No files found.
libcaf_net/caf/net/operation.hpp
View file @
5b6d6bec
...
@@ -66,14 +66,14 @@ enum class operation {
...
@@ -66,14 +66,14 @@ enum class operation {
/// Adds the `block_read` flag to `x` and removes the `read` flag if present.
/// Adds the `block_read` flag to `x` and removes the `read` flag if present.
/// @relates operation
/// @relates operation
[[
nodiscard
]]
constexpr
operation
block_reads
(
operation
x
)
noexcept
{
[[
nodiscard
]]
constexpr
operation
block_reads
(
operation
x
)
noexcept
{
auto
bits
=
to_integer
(
x
)
|
0b0100
;
;
auto
bits
=
to_integer
(
x
)
|
0b0100
;
return
static_cast
<
operation
>
(
bits
&
0b1110
);
return
static_cast
<
operation
>
(
bits
&
0b1110
);
}
}
/// Adds the `block_write` flag to `x` and removes the `write` flag if present.
/// Adds the `block_write` flag to `x` and removes the `write` flag if present.
/// @relates operation
/// @relates operation
[[
nodiscard
]]
constexpr
operation
block_writes
(
operation
x
)
noexcept
{
[[
nodiscard
]]
constexpr
operation
block_writes
(
operation
x
)
noexcept
{
auto
bits
=
to_integer
(
x
)
|
0b1000
;
;
auto
bits
=
to_integer
(
x
)
|
0b1000
;
return
static_cast
<
operation
>
(
bits
&
0b1101
);
return
static_cast
<
operation
>
(
bits
&
0b1101
);
}
}
...
...
libcaf_net/test/net/operation.cpp
View file @
5b6d6bec
...
@@ -34,7 +34,7 @@ SCENARIO("add_write_flag adds the write bit unless block_write prevents it") {
...
@@ -34,7 +34,7 @@ SCENARIO("add_write_flag adds the write bit unless block_write prevents it") {
CHECK_EQ
(
add_wr
(
operation
::
none
),
operation
::
write
);
CHECK_EQ
(
add_wr
(
operation
::
none
),
operation
::
write
);
CHECK_EQ
(
add_wr
(
operation
::
read
),
operation
::
read_write
);
CHECK_EQ
(
add_wr
(
operation
::
read
),
operation
::
read_write
);
CHECK_EQ
(
add_wr
(
operation
::
write
),
operation
::
write
);
CHECK_EQ
(
add_wr
(
operation
::
write
),
operation
::
write
);
CHECK_EQ
(
add_wr
(
operation
::
block_read
),
operation
::
write_only
);
CHECK_EQ
(
add_wr
(
operation
::
block_read
),
operation
::
write_only
);
CHECK_EQ
(
add_wr
(
operation
::
block_write
),
operation
::
block_write
);
CHECK_EQ
(
add_wr
(
operation
::
block_write
),
operation
::
block_write
);
CHECK_EQ
(
add_wr
(
operation
::
read_write
),
operation
::
read_write
);
CHECK_EQ
(
add_wr
(
operation
::
read_write
),
operation
::
read_write
);
CHECK_EQ
(
add_wr
(
operation
::
read_only
),
operation
::
read_only
);
CHECK_EQ
(
add_wr
(
operation
::
read_only
),
operation
::
read_only
);
...
...
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