mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Make the size() method const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -94,7 +94,7 @@ namespace sys {
|
|||||||
|
|
||||||
/// This function returns the number of bytes in the file.
|
/// This function returns the number of bytes in the file.
|
||||||
/// @throws std::string if an error occurs
|
/// @throws std::string if an error occurs
|
||||||
size_t size();
|
size_t size() const;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name Mutators
|
/// @name Mutators
|
||||||
@@ -137,7 +137,7 @@ namespace sys {
|
|||||||
sys::Path path_; ///< Path to the file.
|
sys::Path path_; ///< Path to the file.
|
||||||
int options_; ///< Options used to create the mapping
|
int options_; ///< Options used to create the mapping
|
||||||
void* base_; ///< Pointer to the base memory address
|
void* base_; ///< Pointer to the base memory address
|
||||||
MappedFileInfo* info_; ///< Platform specific info for the mapping
|
mutable MappedFileInfo* info_; ///< Platform specific info for the mapping
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
/// @name Disabled
|
/// @name Disabled
|
||||||
|
@@ -108,7 +108,7 @@ void* MappedFile::map() {
|
|||||||
return base_;
|
return base_;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t MappedFile::size() {
|
size_t MappedFile::size() const {
|
||||||
assert(info_ && "MappedFile not initialized");
|
assert(info_ && "MappedFile not initialized");
|
||||||
return info_->sbuf_.st_size;
|
return info_->sbuf_.st_size;
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ void* MappedFile::map() {
|
|||||||
return base_;
|
return base_;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t MappedFile::size() {
|
size_t MappedFile::size() const {
|
||||||
assert(info_ && "MappedFile not initialized");
|
assert(info_ && "MappedFile not initialized");
|
||||||
return info_->sbuf_.st_size;
|
return info_->sbuf_.st_size;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user