From Andrew Chatham: Make File_read::View::data_ a const pointer.
authorIan Lance Taylor <iant@google.com>
Sat, 22 Sep 2007 05:03:56 +0000 (05:03 +0000)
committerIan Lance Taylor <iant@google.com>
Sat, 22 Sep 2007 05:03:56 +0000 (05:03 +0000)
gold/fileread.h

index f3ac753b140ec780e48485785d790d3af5843b71..59d84f6291240fb849692a8393e576626867fac7 100644 (file)
@@ -88,7 +88,7 @@ class File_read
   class View
   {
    public:
-    View(off_t start, off_t size, unsigned char* data)
+    View(off_t start, off_t size, const unsigned char* data)
       : start_(start), size_(size), data_(data), lock_count_(0)
     { }
 
@@ -102,7 +102,7 @@ class File_read
     size() const
     { return this->size_; }
 
-    unsigned char*
+    const unsigned char*
     data() const
     { return this->data_; }
 
@@ -121,7 +121,7 @@ class File_read
 
     off_t start_;
     off_t size_;
-    unsigned char* data_;
+    const unsigned char* data_;
     int lock_count_;
   };