diff options
Diffstat (limited to 'src/tools/singlejar/mapped_file_posix.inc')
-rw-r--r-- | src/tools/singlejar/mapped_file_posix.inc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/singlejar/mapped_file_posix.inc b/src/tools/singlejar/mapped_file_posix.inc index ad6c6a5310..637661b719 100644 --- a/src/tools/singlejar/mapped_file_posix.inc +++ b/src/tools/singlejar/mapped_file_posix.inc @@ -30,10 +30,10 @@ #error This code for 64 bit Unix. #endif -inline MappedFile::MappedFile() +MappedFile::MappedFile() : mapped_start_(nullptr), mapped_end_(nullptr), fd_(-1) {} -inline bool MappedFile::Open(const std::string& path) { +bool MappedFile::Open(const std::string& path) { if (is_open()) { diag_errx(1, "%s:%d: This instance is already open", __FILE__, __LINE__); } @@ -60,7 +60,7 @@ inline bool MappedFile::Open(const std::string& path) { return true; } -inline void MappedFile::Close() { +void MappedFile::Close() { if (is_open()) { munmap(mapped_start_, mapped_end_ - mapped_start_); mapped_start_ = mapped_end_ = nullptr; @@ -69,6 +69,4 @@ inline void MappedFile::Close() { } } -inline bool MappedFile::is_open() const { return fd_ >= 0; } - #endif // BAZEL_SRC_TOOLS_SINGLEJAR_MAPPED_FILE_POSIX_H_ |