summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-08-21 18:56:14 +0200
committerMax Kellermann <max@musicpd.org>2018-08-21 18:56:14 +0200
commitd11e1d588076a88299e638e675d73c566384b587 (patch)
treec49d0076d9bb38f235481360cad3b7e5f686d0fe /src/fs
parentb1434777745de00011d9ce0f210a3a9e97658ae6 (diff)
fs/io/FileOutputStream: add "noexcept"
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/io/FileOutputStream.cxx4
-rw-r--r--src/fs/io/FileOutputStream.hxx12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/fs/io/FileOutputStream.cxx b/src/fs/io/FileOutputStream.cxx
index bd16bec07..67b9318af 100644
--- a/src/fs/io/FileOutputStream.cxx
+++ b/src/fs/io/FileOutputStream.cxx
@@ -123,7 +123,7 @@ FileOutputStream::Commit()
}
void
-FileOutputStream::Cancel()
+FileOutputStream::Cancel() noexcept
{
assert(IsDefined());
@@ -243,7 +243,7 @@ FileOutputStream::Commit()
}
void
-FileOutputStream::Cancel()
+FileOutputStream::Cancel() noexcept
{
assert(IsDefined());
diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx
index ac4c3342e..d96e044d5 100644
--- a/src/fs/io/FileOutputStream.hxx
+++ b/src/fs/io/FileOutputStream.hxx
@@ -100,13 +100,13 @@ private:
public:
explicit FileOutputStream(Path _path, Mode _mode=Mode::CREATE);
- ~FileOutputStream() {
+ ~FileOutputStream() noexcept {
if (IsDefined())
Cancel();
}
public:
- Path GetPath() const {
+ Path GetPath() const noexcept {
return path;
}
@@ -117,13 +117,13 @@ public:
void Write(const void *data, size_t size) override;
void Commit();
- void Cancel();
+ void Cancel() noexcept;
private:
void OpenCreate(bool visible);
void OpenAppend(bool create);
- bool Close() {
+ bool Close() noexcept {
assert(IsDefined());
#ifdef _WIN32
@@ -136,13 +136,13 @@ private:
}
#ifdef _WIN32
- bool SeekEOF() {
+ bool SeekEOF() noexcept {
return SetFilePointer(handle, 0, nullptr,
FILE_END) != 0xffffffff;
}
#endif
- bool IsDefined() const {
+ bool IsDefined() const noexcept {
#ifdef _WIN32
return handle != INVALID_HANDLE_VALUE;
#else