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
7c1843ee
Commit
7c1843ee
authored
Apr 24, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fs/AllocatedPath: add `noexcept`
parent
bc8bb41a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
AllocatedPath.cxx
src/fs/AllocatedPath.cxx
+1
-1
AllocatedPath.hxx
src/fs/AllocatedPath.hxx
+15
-10
No files found.
src/fs/AllocatedPath.cxx
View file @
7c1843ee
...
...
@@ -26,7 +26,7 @@
#include <exception>
/* no inlining, please */
AllocatedPath
::~
AllocatedPath
()
{}
AllocatedPath
::~
AllocatedPath
()
noexcept
=
default
;
AllocatedPath
AllocatedPath
::
FromUTF8
(
const
char
*
path_utf8
)
noexcept
...
...
src/fs/AllocatedPath.hxx
View file @
7c1843ee
...
...
@@ -43,15 +43,18 @@ class AllocatedPath {
string
value
;
explicit
AllocatedPath
(
const_pointer_type
_value
)
:
value
(
_value
)
{}
explicit
AllocatedPath
(
const_pointer_type
_value
)
noexcept
:
value
(
_value
)
{}
AllocatedPath
(
const_pointer_type
_begin
,
const_pointer_type
_end
)
AllocatedPath
(
const_pointer_type
_begin
,
const_pointer_type
_end
)
noexcept
:
value
(
_begin
,
_end
)
{}
AllocatedPath
(
string
&&
_value
)
:
value
(
std
::
move
(
_value
))
{}
AllocatedPath
(
string
&&
_value
)
noexcept
:
value
(
std
::
move
(
_value
))
{}
static
AllocatedPath
Build
(
const_pointer_type
a
,
size_t
a_size
,
const_pointer_type
b
,
size_t
b_size
)
{
const_pointer_type
b
,
size_t
b_size
)
noexcept
{
return
AllocatedPath
(
Traits
::
Build
(
a
,
a_size
,
b
,
b_size
));
}
public
:
...
...
@@ -61,7 +64,7 @@ public:
*
* @see IsNull()
*/
AllocatedPath
(
std
::
nullptr_t
)
:
value
()
{}
AllocatedPath
(
std
::
nullptr_t
)
noexcept
:
value
()
{}
/**
* Copy an #AllocatedPath object.
...
...
@@ -71,11 +74,13 @@ public:
/**
* Move an #AllocatedPath object.
*/
AllocatedPath
(
AllocatedPath
&&
other
)
:
value
(
std
::
move
(
other
.
value
))
{}
AllocatedPath
(
AllocatedPath
&&
other
)
noexcept
:
value
(
std
::
move
(
other
.
value
))
{}
explicit
AllocatedPath
(
Path
other
)
:
value
(
other
.
c_str
())
{}
explicit
AllocatedPath
(
Path
other
)
noexcept
:
value
(
other
.
c_str
())
{}
~
AllocatedPath
();
~
AllocatedPath
()
noexcept
;
gcc_pure
operator
Path
()
const
noexcept
{
...
...
@@ -174,7 +179,7 @@ public:
/**
* Move an #AllocatedPath object.
*/
AllocatedPath
&
operator
=
(
AllocatedPath
&&
other
)
{
AllocatedPath
&
operator
=
(
AllocatedPath
&&
other
)
noexcept
{
value
=
std
::
move
(
other
.
value
);
return
*
this
;
}
...
...
@@ -193,7 +198,7 @@ public:
* Allows the caller to "steal" the internal value by
* providing a rvalue reference to the std::string attribute.
*/
string
&&
Steal
()
{
string
&&
Steal
()
noexcept
{
return
std
::
move
(
value
);
}
...
...
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