aboutsummaryrefslogtreecommitdiff
path: root/gold/fileread.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-14 18:22:06 +0000
committerIan Lance Taylor <iant@google.com>2007-12-14 18:22:06 +0000
commitc71c6f566c01351ad781155c81311a1ffaece06b (patch)
tree90e68f59f248aa1aec5283293d522e363decb941 /gold/fileread.cc
parentafe8ab2206b453d775fe82aec2d3073181251a3e (diff)
downloadgdb-c71c6f566c01351ad781155c81311a1ffaece06b.zip
gdb-c71c6f566c01351ad781155c81311a1ffaece06b.tar.gz
gdb-c71c6f566c01351ad781155c81311a1ffaece06b.tar.bz2
Make some File_read methods const.
Diffstat (limited to 'gold/fileread.cc')
-rw-r--r--gold/fileread.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/gold/fileread.cc b/gold/fileread.cc
index 9579f0f..b917109 100644
--- a/gold/fileread.cc
+++ b/gold/fileread.cc
@@ -170,10 +170,10 @@ File_read::is_locked()
// SIZE bytes. Return a pointer to the View if found, NULL if not.
inline File_read::View*
-File_read::find_view(off_t start, off_t size)
+File_read::find_view(off_t start, off_t size) const
{
off_t page = File_read::page_offset(start);
- Views::iterator p = this->views_.find(page);
+ Views::const_iterator p = this->views_.find(page);
if (p == this->views_.end())
return NULL;
if (p->second->size() - (start - page) < size)
@@ -185,10 +185,8 @@ File_read::find_view(off_t start, off_t size)
// the buffer at P.
void
-File_read::do_read(off_t start, off_t size, void* p)
+File_read::do_read(off_t start, off_t size, void* p) const
{
- gold_assert(this->lock_count_ > 0);
-
off_t bytes;
if (this->contents_ != NULL)
{
@@ -223,7 +221,7 @@ File_read::do_read(off_t start, off_t size, void* p)
// Read data from the file.
void
-File_read::read(off_t start, off_t size, void* p)
+File_read::read(off_t start, off_t size, void* p) const
{
gold_assert(this->lock_count_ > 0);