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
aa5c5bf1
Commit
aa5c5bf1
authored
Apr 16, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
neighbor/smbclient: add `noexcept`
parent
2e804772
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
SmbclientNeighborPlugin.cxx
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+12
-12
No files found.
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
View file @
aa5c5bf1
...
...
@@ -39,7 +39,7 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
struct
Server
{
const
std
::
string
name
,
comment
;
Server
(
std
::
string
&&
_name
,
std
::
string
&&
_comment
)
Server
(
std
::
string
&&
_name
,
std
::
string
&&
_comment
)
noexcept
:
name
(
std
::
move
(
_name
)),
comment
(
std
::
move
(
_comment
))
{}
...
...
@@ -66,7 +66,7 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
bool
quit
;
public
:
SmbclientNeighborExplorer
(
NeighborListener
&
_listener
)
SmbclientNeighborExplorer
(
NeighborListener
&
_listener
)
noexcept
:
NeighborExplorer
(
_listener
),
thread
(
BIND_THIS_METHOD
(
ThreadFunc
))
{}
...
...
@@ -76,8 +76,8 @@ public:
List
GetList
()
const
noexcept
override
;
private
:
void
Run
();
void
ThreadFunc
();
void
Run
()
noexcept
;
void
ThreadFunc
()
noexcept
;
};
void
...
...
@@ -111,7 +111,7 @@ SmbclientNeighborExplorer::GetList() const noexcept
}
static
void
ReadServer
(
NeighborExplorer
::
List
&
list
,
const
smbc_dirent
&
e
)
ReadServer
(
NeighborExplorer
::
List
&
list
,
const
smbc_dirent
&
e
)
noexcept
{
const
std
::
string
name
(
e
.
name
,
e
.
namelen
);
const
std
::
string
comment
(
e
.
comment
,
e
.
commentlen
);
...
...
@@ -120,17 +120,17 @@ ReadServer(NeighborExplorer::List &list, const smbc_dirent &e)
}
static
void
ReadServers
(
NeighborExplorer
::
List
&
list
,
const
char
*
uri
);
ReadServers
(
NeighborExplorer
::
List
&
list
,
const
char
*
uri
)
noexcept
;
static
void
ReadWorkgroup
(
NeighborExplorer
::
List
&
list
,
const
std
::
string
&
name
)
ReadWorkgroup
(
NeighborExplorer
::
List
&
list
,
const
std
::
string
&
name
)
noexcept
{
std
::
string
uri
=
"smb://"
+
name
;
ReadServers
(
list
,
uri
.
c_str
());
}
static
void
ReadEntry
(
NeighborExplorer
::
List
&
list
,
const
smbc_dirent
&
e
)
ReadEntry
(
NeighborExplorer
::
List
&
list
,
const
smbc_dirent
&
e
)
noexcept
{
switch
(
e
.
smbc_type
)
{
case
SMBC_WORKGROUP
:
...
...
@@ -144,7 +144,7 @@ ReadEntry(NeighborExplorer::List &list, const smbc_dirent &e)
}
static
void
ReadServers
(
NeighborExplorer
::
List
&
list
,
int
fd
)
ReadServers
(
NeighborExplorer
::
List
&
list
,
int
fd
)
noexcept
{
smbc_dirent
*
e
;
while
((
e
=
smbc_readdir
(
fd
))
!=
nullptr
)
...
...
@@ -154,7 +154,7 @@ ReadServers(NeighborExplorer::List &list, int fd)
}
static
void
ReadServers
(
NeighborExplorer
::
List
&
list
,
const
char
*
uri
)
ReadServers
(
NeighborExplorer
::
List
&
list
,
const
char
*
uri
)
noexcept
{
int
fd
=
smbc_opendir
(
uri
);
if
(
fd
>=
0
)
{
...
...
@@ -189,7 +189,7 @@ FindBeforeServerByURI(NeighborExplorer::List::const_iterator prev,
}
inline
void
SmbclientNeighborExplorer
::
Run
()
SmbclientNeighborExplorer
::
Run
()
noexcept
{
List
found
=
DetectServers
(),
lost
;
...
...
@@ -228,7 +228,7 @@ SmbclientNeighborExplorer::Run()
}
inline
void
SmbclientNeighborExplorer
::
ThreadFunc
()
SmbclientNeighborExplorer
::
ThreadFunc
()
noexcept
{
SetThreadName
(
"smbclient"
);
...
...
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