Fixed compilation warnings due to unused results in release versions.
This commit is contained in:
parent
75e77c53e4
commit
ede7477ffa
@ -374,7 +374,7 @@ StreamError FileStream::open(const char* path, FileOpenMode mode_)
|
||||
void FileStream::close()
|
||||
{
|
||||
MIJIN_ASSERT(handle != nullptr, "FileStream is not open.");
|
||||
const int result = std::fclose(handle); // NOLINT(cppcoreguidelines-owning-memory)
|
||||
[[maybe_unused]] const int result = std::fclose(handle); // NOLINT(cppcoreguidelines-owning-memory)
|
||||
MIJIN_ASSERT(result == 0, "fclose failed.");
|
||||
handle = nullptr;
|
||||
}
|
||||
@ -453,7 +453,7 @@ StreamError FileStream::seek(std::intptr_t pos, SeekMode seekMode)
|
||||
|
||||
void FileStream::flush()
|
||||
{
|
||||
const int result = std::fflush(handle);
|
||||
[[maybe_unused]] const int result = std::fflush(handle);
|
||||
MIJIN_ASSERT(result == 0, "fflush failed.");
|
||||
}
|
||||
|
||||
@ -465,7 +465,7 @@ bool FileStream::isAtEnd()
|
||||
if (std::feof(handle)) {
|
||||
return true;
|
||||
}
|
||||
const int result = std::fseek(handle, -1, SEEK_CUR);
|
||||
[[maybe_unused]] const int result = std::fseek(handle, -1, SEEK_CUR);
|
||||
MIJIN_ASSERT(result == 0, "fseek failed.");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user