Skip to content

Commit 75849c8

Browse files
committed
[fs linux]: Simplify terniary expressions to bool
1 parent 513059c commit 75849c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/xenia/base/filesystem_posix.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ class PosixFileHandle : public FileHandle {
141141
size_t* out_bytes_read) override {
142142
ssize_t out = pread(handle_, buffer, buffer_length, file_offset);
143143
*out_bytes_read = out;
144-
return out >= 0 ? true : false;
144+
return out >= 0;
145145
}
146146
bool Write(size_t file_offset, const void* buffer, size_t buffer_length,
147147
size_t* out_bytes_written) override {
148148
ssize_t out = pwrite(handle_, buffer, buffer_length, file_offset);
149149
*out_bytes_written = out;
150-
return out >= 0 ? true : false;
150+
return out >= 0;
151151
}
152152
bool SetLength(size_t length) override {
153-
return ftruncate(handle_, length) >= 0 ? true : false;
153+
return ftruncate(handle_, length) >= 0;
154154
}
155155
void Flush() override { fsync(handle_); }
156156

0 commit comments

Comments
 (0)