diff options
Diffstat (limited to 'runtime/base')
-rw-r--r-- | runtime/base/macros.h | 2 | ||||
-rw-r--r-- | runtime/base/unix_file/fd_file.cc | 4 | ||||
-rw-r--r-- | runtime/base/unix_file/fd_file.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/runtime/base/macros.h b/runtime/base/macros.h index 6531858..d00c64a 100644 --- a/runtime/base/macros.h +++ b/runtime/base/macros.h @@ -138,8 +138,10 @@ char (&ArraySizeHelper(T (&array)[N]))[N]; #if defined (__APPLE__) #define HOT_ATTR +#define COLD_ATTR #else #define HOT_ATTR __attribute__ ((hot)) +#define COLD_ATTR __attribute__ ((cold)) #endif #define PURE __attribute__ ((__pure__)) diff --git a/runtime/base/unix_file/fd_file.cc b/runtime/base/unix_file/fd_file.cc index 36f8ba7..f48c76d 100644 --- a/runtime/base/unix_file/fd_file.cc +++ b/runtime/base/unix_file/fd_file.cc @@ -102,10 +102,6 @@ bool FdFile::IsOpened() const { return fd_ >= 0; } -std::string FdFile::GetPath() const { - return file_path_; -} - bool FdFile::ReadFully(void* buffer, int64_t byte_count) { char* ptr = static_cast<char*>(buffer); while (byte_count > 0) { diff --git a/runtime/base/unix_file/fd_file.h b/runtime/base/unix_file/fd_file.h index 79a0db9..19e3511 100644 --- a/runtime/base/unix_file/fd_file.h +++ b/runtime/base/unix_file/fd_file.h @@ -57,7 +57,9 @@ class FdFile : public RandomAccessFile { // Bonus API. int Fd() const; bool IsOpened() const; - std::string GetPath() const; + const std::string& GetPath() const { + return file_path_; + } void DisableAutoClose(); bool ReadFully(void* buffer, int64_t byte_count); bool WriteFully(const void* buffer, int64_t byte_count); |