unix/PidFile: add "noexcept"

This commit is contained in:
Max Kellermann 2018-08-01 20:27:56 +02:00
parent dfda0faac7
commit 2a2c5d50ff
1 changed files with 4 additions and 4 deletions

View File

@ -48,14 +48,14 @@ public:
PidFile(const PidFile &) = delete; PidFile(const PidFile &) = delete;
void Close() { void Close() noexcept {
if (fd < 0) if (fd < 0)
return; return;
close(fd); close(fd);
} }
void Delete(const AllocatedPath &path) { void Delete(const AllocatedPath &path) noexcept {
if (fd < 0) { if (fd < 0) {
assert(path.IsNull()); assert(path.IsNull());
return; return;
@ -67,7 +67,7 @@ public:
unlink(path.c_str()); unlink(path.c_str());
} }
void Write(pid_t pid) { void Write(pid_t pid) noexcept {
if (fd < 0) if (fd < 0)
return; return;
@ -78,7 +78,7 @@ public:
close(fd); close(fd);
} }
void Write() { void Write() noexcept {
if (fd < 0) if (fd < 0)
return; return;