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
def6b936
Commit
def6b936
authored
Apr 03, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client/Response: add `noexcept`
parent
3610f554
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
Response.cxx
src/client/Response.cxx
+6
-6
Response.hxx
src/client/Response.hxx
+9
-9
No files found.
src/client/Response.cxx
View file @
def6b936
...
...
@@ -29,25 +29,25 @@ Response::GetTagMask() const noexcept
}
bool
Response
::
Write
(
const
void
*
data
,
size_t
length
)
Response
::
Write
(
const
void
*
data
,
size_t
length
)
noexcept
{
return
client
.
Write
(
data
,
length
);
}
bool
Response
::
Write
(
const
char
*
data
)
Response
::
Write
(
const
char
*
data
)
noexcept
{
return
client
.
Write
(
data
);
}
bool
Response
::
FormatV
(
const
char
*
fmt
,
va_list
args
)
Response
::
FormatV
(
const
char
*
fmt
,
va_list
args
)
noexcept
{
return
Write
(
FormatStringV
(
fmt
,
args
).
c_str
());
}
bool
Response
::
Format
(
const
char
*
fmt
,
...)
Response
::
Format
(
const
char
*
fmt
,
...)
noexcept
{
va_list
args
;
va_start
(
args
,
fmt
);
...
...
@@ -57,13 +57,13 @@ Response::Format(const char *fmt, ...)
}
void
Response
::
Error
(
enum
ack
code
,
const
char
*
msg
)
Response
::
Error
(
enum
ack
code
,
const
char
*
msg
)
noexcept
{
FormatError
(
code
,
"%s"
,
msg
);
}
void
Response
::
FormatError
(
enum
ack
code
,
const
char
*
fmt
,
...)
Response
::
FormatError
(
enum
ack
code
,
const
char
*
fmt
,
...)
noexcept
{
Format
(
"ACK [%i@%u] {%s} "
,
(
int
)
code
,
list_index
,
command
);
...
...
src/client/Response.hxx
View file @
def6b936
...
...
@@ -44,7 +44,7 @@ class Response {
const
char
*
command
;
public
:
Response
(
Client
&
_client
,
unsigned
_list_index
)
Response
(
Client
&
_client
,
unsigned
_list_index
)
noexcept
:
client
(
_client
),
list_index
(
_list_index
),
command
(
""
)
{}
Response
(
const
Response
&
)
=
delete
;
...
...
@@ -56,7 +56,7 @@ public:
* determine how to format the response. For this reason, the
* returned reference is "const".
*/
const
Client
&
GetClient
()
const
{
const
Client
&
GetClient
()
const
noexcept
{
return
client
;
}
...
...
@@ -67,17 +67,17 @@ public:
gcc_pure
TagMask
GetTagMask
()
const
noexcept
;
void
SetCommand
(
const
char
*
_command
)
{
void
SetCommand
(
const
char
*
_command
)
noexcept
{
command
=
_command
;
}
bool
Write
(
const
void
*
data
,
size_t
length
);
bool
Write
(
const
char
*
data
);
bool
FormatV
(
const
char
*
fmt
,
va_list
args
);
bool
Format
(
const
char
*
fmt
,
...);
bool
Write
(
const
void
*
data
,
size_t
length
)
noexcept
;
bool
Write
(
const
char
*
data
)
noexcept
;
bool
FormatV
(
const
char
*
fmt
,
va_list
args
)
noexcept
;
bool
Format
(
const
char
*
fmt
,
...)
noexcept
;
void
Error
(
enum
ack
code
,
const
char
*
msg
);
void
FormatError
(
enum
ack
code
,
const
char
*
fmt
,
...);
void
Error
(
enum
ack
code
,
const
char
*
msg
)
noexcept
;
void
FormatError
(
enum
ack
code
,
const
char
*
fmt
,
...)
noexcept
;
};
#endif
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