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
2125e3ed
Commit
2125e3ed
authored
Feb 20, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db/simple/Directory: add `noexcept`
parent
3da7ecfa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
Directory.cxx
src/db/plugins/simple/Directory.cxx
+6
-6
Directory.hxx
src/db/plugins/simple/Directory.hxx
+9
-9
No files found.
src/db/plugins/simple/Directory.cxx
View file @
2125e3ed
/*
* Copyright 2003-201
8
The Music Player Daemon Project
* Copyright 2003-201
9
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -37,13 +37,13 @@
#include <string.h>
#include <stdlib.h>
Directory
::
Directory
(
std
::
string
&&
_path_utf8
,
Directory
*
_parent
)
Directory
::
Directory
(
std
::
string
&&
_path_utf8
,
Directory
*
_parent
)
noexcept
:
parent
(
_parent
),
path
(
std
::
move
(
_path_utf8
))
{
}
Directory
::~
Directory
()
Directory
::~
Directory
()
noexcept
{
delete
mounted_database
;
...
...
@@ -52,7 +52,7 @@ Directory::~Directory()
}
void
Directory
::
Delete
()
Directory
::
Delete
()
noexcept
{
assert
(
holding_db_lock
());
assert
(
parent
!=
nullptr
);
...
...
@@ -70,7 +70,7 @@ Directory::GetName() const noexcept
}
Directory
*
Directory
::
CreateChild
(
const
char
*
name_utf8
)
Directory
::
CreateChild
(
const
char
*
name_utf8
)
noexcept
{
assert
(
holding_db_lock
());
assert
(
name_utf8
!=
nullptr
);
...
...
@@ -160,7 +160,7 @@ Directory::LookupDirectory(const char *uri) noexcept
}
void
Directory
::
AddSong
(
Song
*
song
)
Directory
::
AddSong
(
Song
*
song
)
noexcept
{
assert
(
holding_db_lock
());
assert
(
song
!=
nullptr
);
...
...
src/db/plugins/simple/Directory.hxx
View file @
2125e3ed
/*
* Copyright 2003-201
8
The Music Player Daemon Project
* Copyright 2003-201
9
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -99,18 +99,18 @@ struct Directory {
Database
*
mounted_database
=
nullptr
;
public
:
Directory
(
std
::
string
&&
_path_utf8
,
Directory
*
_parent
);
~
Directory
();
Directory
(
std
::
string
&&
_path_utf8
,
Directory
*
_parent
)
noexcept
;
~
Directory
()
noexcept
;
/**
* Create a new root #Directory object.
*/
gcc_malloc
gcc_returns_nonnull
static
Directory
*
NewRoot
()
{
static
Directory
*
NewRoot
()
noexcept
{
return
new
Directory
(
std
::
string
(),
nullptr
);
}
bool
IsMount
()
const
{
bool
IsMount
()
const
noexcept
{
return
mounted_database
!=
nullptr
;
}
...
...
@@ -120,7 +120,7 @@ public:
*
* Caller must lock the #db_mutex.
*/
void
Delete
();
void
Delete
()
noexcept
;
/**
* Create a new #Directory object as a child of the given one.
...
...
@@ -129,7 +129,7 @@ public:
*
* @param name_utf8 the UTF-8 encoded name of the new sub directory
*/
Directory
*
CreateChild
(
const
char
*
name_utf8
);
Directory
*
CreateChild
(
const
char
*
name_utf8
)
noexcept
;
/**
* Caller must lock the #db_mutex.
...
...
@@ -149,7 +149,7 @@ public:
*
* Caller must lock the #db_mutex.
*/
Directory
*
MakeChild
(
const
char
*
name_utf8
)
{
Directory
*
MakeChild
(
const
char
*
name_utf8
)
noexcept
{
Directory
*
child
=
FindChild
(
name_utf8
);
if
(
child
==
nullptr
)
child
=
CreateChild
(
name_utf8
);
...
...
@@ -242,7 +242,7 @@ public:
* Add a song object to this directory. Its "parent" attribute must
* be set already.
*/
void
AddSong
(
Song
*
song
);
void
AddSong
(
Song
*
song
)
noexcept
;
/**
* Remove a song object from this directory (which effectively
...
...
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