mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 23:02:47 +01:00
common: fs: file: Remove [[nodiscard]] attribute from Flush
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
This commit is contained in:
parent
81b1b71993
commit
cf0b9d1de2
2 changed files with 3 additions and 3 deletions
|
@ -394,11 +394,11 @@ public:
|
||||||
[[nodiscard]] size_t WriteString(std::span<const char> string) const;
|
[[nodiscard]] size_t WriteString(std::span<const char> string) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flushes any unwritten buffered data into the file.
|
* Attempts to flush any unwritten buffered data into the file and flush the file into the disk.
|
||||||
*
|
*
|
||||||
* @returns True if the flush was successful, false otherwise.
|
* @returns True if the flush was successful, false otherwise.
|
||||||
*/
|
*/
|
||||||
[[nodiscard]] bool Flush() const;
|
bool Flush() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the file to a given size.
|
* Resizes the file to a given size.
|
||||||
|
|
|
@ -186,7 +186,7 @@ void FileBackend::Write(const Entry& entry) {
|
||||||
|
|
||||||
bytes_written += file->WriteString(FormatLogMessage(entry).append(1, '\n'));
|
bytes_written += file->WriteString(FormatLogMessage(entry).append(1, '\n'));
|
||||||
if (entry.log_level >= Level::Error) {
|
if (entry.log_level >= Level::Error) {
|
||||||
void(file->Flush());
|
file->Flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue