From caddc2a7b4f0b6433462d2b4660a2d9ac26585fd Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 12 Apr 2013 15:51:47 +0200 Subject: Fix build of the rest of v4vm against WTF/JSC update * Add missing functions to our WTF stubs * Some of the math functions wrapped with MathExtras.h are back in the std:: namespace they belong to Change-Id: I9da43e8344ab8c95edc8db19f44ccdbd91b4ac70 Reviewed-by: Lars Knoll --- src/3rdparty/masm/stubs/wtf/PassOwnPtr.h | 4 ++++ src/3rdparty/masm/stubs/wtf/Vector.h | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/3rdparty/masm') diff --git a/src/3rdparty/masm/stubs/wtf/PassOwnPtr.h b/src/3rdparty/masm/stubs/wtf/PassOwnPtr.h index f9b84e7b57..601d278c16 100644 --- a/src/3rdparty/masm/stubs/wtf/PassOwnPtr.h +++ b/src/3rdparty/masm/stubs/wtf/PassOwnPtr.h @@ -54,6 +54,10 @@ struct OwnPtr : public QScopedPointer : QScopedPointer(ptr.leakRef()) {} + OwnPtr(const OwnPtr& other) + : QScopedPointer(const_cast &>(other).take()) + {} + OwnPtr& operator=(const OwnPtr& other) { this->reset(const_cast &>(other).take()); diff --git a/src/3rdparty/masm/stubs/wtf/Vector.h b/src/3rdparty/masm/stubs/wtf/Vector.h index 1feea851e1..39742d8ab0 100644 --- a/src/3rdparty/masm/stubs/wtf/Vector.h +++ b/src/3rdparty/masm/stubs/wtf/Vector.h @@ -46,9 +46,13 @@ #include #include +enum WTF_UnusedOverflowMode { + UnsafeVectorOverflow +}; + namespace WTF { -template +template class Vector : public std::vector { public: Vector() {} @@ -64,6 +68,8 @@ public: using std::vector::insert; + inline void reserveInitialCapacity(size_t size) { this->reserve(size); } + inline void insert(size_t position, T value) { this->insert(this->begin() + position, value); } @@ -73,6 +79,9 @@ public: inline void shrink(size_t size) { this->erase(this->begin() + size, this->end()); } + inline void shrinkToFit() + { this->shrink_to_fit(); } + inline void remove(size_t position) { this->erase(this->begin() + position); } -- cgit v1.2.3