Reviewers: Erik Corry, Description: Move const qualifies around to avoid GCC warnings. (GCC 4.3.2)
src/objects.h: In instantiation of 'v8::internal::VectorIterator<const char>': src/objects.cc:3681: instantiated from here src/objects.h:3451: error: type qualifiers ignored on function return type Please review this at http://codereview.chromium.org/7027 Affected files: M src/objects.cc M src/objects.h Index: src/objects.cc =================================================================== --- src/objects.cc (revision 479) +++ src/objects.cc (working copy) @@ -3677,10 +3677,10 @@ static inline bool CompareStringContentsPartial(IteratorA* ia, String* b) { if (b->IsFlat()) { if (b->IsAsciiRepresentation()) { - VectorIterator<const char> ib(b->ToAsciiVector()); + VectorIterator<char> ib(b->ToAsciiVector()); return CompareStringContents(ia, &ib); } else { - VectorIterator<const uc16> ib(b->ToUC16Vector()); + VectorIterator<uc16> ib(b->ToUC16Vector()); return CompareStringContents(ia, &ib); } } else { @@ -3707,10 +3707,10 @@ if (this->IsFlat()) { if (this->IsAsciiRepresentation()) { - VectorIterator<const char> buf1(this->ToAsciiVector()); + VectorIterator<char> buf1(this->ToAsciiVector()); return CompareStringContentsPartial(&buf1, other); } else { - VectorIterator<const uc16> buf1(this->ToUC16Vector()); + VectorIterator<uc16> buf1(this->ToUC16Vector()); return CompareStringContentsPartial(&buf1, other); } } else { Index: src/objects.h =================================================================== --- src/objects.h (revision 479) +++ src/objects.h (working copy) @@ -3446,12 +3446,12 @@ template <typename T> class VectorIterator { public: - VectorIterator(T* d, int l) : data_(Vector<T>(d, l)), index_(0) { } - explicit VectorIterator(Vector<T> data) : data_(data), index_(0) { } + VectorIterator(T* d, int l) : data_(Vector<const T>(d, l)), index_(0) { } + explicit VectorIterator(Vector<const T> data) : data_(data), index_(0) { } T GetNext() { return data_[index_++]; } bool has_more() { return index_ < data_.length(); } private: - Vector<T> data_; + Vector<const T> data_; int index_; }; --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
