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
43ac264f
Commit
43ac264f
authored
Nov 05, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag/Mask: add `noexcept`
parent
cbaa98c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
Mask.hxx
src/tag/Mask.hxx
+15
-15
No files found.
src/tag/Mask.hxx
View file @
43ac264f
...
...
@@ -28,67 +28,67 @@ class TagMask {
typedef
uint_least32_t
mask_t
;
mask_t
value
;
explicit
constexpr
TagMask
(
uint_least32_t
_value
)
explicit
constexpr
TagMask
(
uint_least32_t
_value
)
noexcept
:
value
(
_value
)
{}
public
:
TagMask
()
=
default
;
constexpr
TagMask
(
TagType
tag
)
constexpr
TagMask
(
TagType
tag
)
noexcept
:
value
(
mask_t
(
1
)
<<
mask_t
(
tag
))
{}
static
constexpr
TagMask
None
()
{
static
constexpr
TagMask
None
()
noexcept
{
return
TagMask
(
mask_t
(
0
));
}
static
constexpr
TagMask
All
()
{
static
constexpr
TagMask
All
()
noexcept
{
return
~
None
();
}
constexpr
TagMask
operator
~
()
const
{
constexpr
TagMask
operator
~
()
const
noexcept
{
return
TagMask
(
~
value
);
}
constexpr
TagMask
operator
&
(
TagMask
other
)
const
{
constexpr
TagMask
operator
&
(
TagMask
other
)
const
noexcept
{
return
TagMask
(
value
&
other
.
value
);
}
constexpr
TagMask
operator
|
(
TagMask
other
)
const
{
constexpr
TagMask
operator
|
(
TagMask
other
)
const
noexcept
{
return
TagMask
(
value
|
other
.
value
);
}
constexpr
TagMask
operator
^
(
TagMask
other
)
const
{
constexpr
TagMask
operator
^
(
TagMask
other
)
const
noexcept
{
return
TagMask
(
value
^
other
.
value
);
}
TagMask
&
operator
&=
(
TagMask
other
)
{
TagMask
&
operator
&=
(
TagMask
other
)
noexcept
{
value
&=
other
.
value
;
return
*
this
;
}
TagMask
&
operator
|=
(
TagMask
other
)
{
TagMask
&
operator
|=
(
TagMask
other
)
noexcept
{
value
|=
other
.
value
;
return
*
this
;
}
TagMask
&
operator
^=
(
TagMask
other
)
{
TagMask
&
operator
^=
(
TagMask
other
)
noexcept
{
value
^=
other
.
value
;
return
*
this
;
}
constexpr
bool
TestAny
()
const
{
constexpr
bool
TestAny
()
const
noexcept
{
return
value
!=
0
;
}
constexpr
bool
Test
(
TagType
tag
)
const
{
constexpr
bool
Test
(
TagType
tag
)
const
noexcept
{
return
(
*
this
&
tag
).
TestAny
();
}
void
Set
(
TagType
tag
)
{
void
Set
(
TagType
tag
)
noexcept
{
*
this
|=
tag
;
}
void
Unset
(
TagType
tag
)
{
void
Unset
(
TagType
tag
)
noexcept
{
*
this
|=
~
TagMask
(
tag
);
}
};
...
...
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