From 1c764cabf09f9c695d4e7f238b99480a0e45bc2a Mon Sep 17 00:00:00 2001 From: Jordan DeLong Date: Sun, 7 Jul 2013 15:49:55 -0700 Subject: [PATCH] Remove redundant function in Array get() and getArrayData() do the same thing. --- hphp/runtime/base/array/array_iterator.cpp | 4 ++-- hphp/runtime/base/array/array_util.cpp | 2 +- hphp/runtime/base/type_array.h | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hphp/runtime/base/array/array_iterator.cpp b/hphp/runtime/base/array/array_iterator.cpp index a1253e8bc..dc4b2e388 100644 --- a/hphp/runtime/base/array/array_iterator.cpp +++ b/hphp/runtime/base/array/array_iterator.cpp @@ -688,7 +688,7 @@ bool Iter::init(TypedValue* c1) { Class* ctx = arGetContextClass(g_vmContext->getFP()); CStrRef ctxStr = ctx ? ctx->nameRef() : null_string; Array iterArray(obj->o_toIterArray(ctxStr)); - ArrayData* ad = iterArray.getArrayData(); + ArrayData* ad = iterArray.get(); (void) new (&arr()) ArrayIter(ad); } } @@ -1075,7 +1075,7 @@ static int64_t new_iter_object_any(Iter* dest, ObjectData* obj, Class* ctx, __func__, dest, obj, ctx); CStrRef ctxStr = ctx ? ctx->nameRef() : null_string; Array iterArray(itObj->o_toIterArray(ctxStr)); - ArrayData* ad = iterArray.getArrayData(); + ArrayData* ad = iterArray.get(); (void) new (&dest->arr()) ArrayIter(ad); itType = ArrayIter::TypeArray; } diff --git a/hphp/runtime/base/array/array_util.cpp b/hphp/runtime/base/array/array_util.cpp index 364e9b6e8..712832c52 100644 --- a/hphp/runtime/base/array/array_util.cpp +++ b/hphp/runtime/base/array/array_util.cpp @@ -464,7 +464,7 @@ Variant ArrayUtil::CountValues(CArrRef input) { Array ArrayUtil::EnsureIntKeys(CArrRef input) { assert(!input.isNull()); - if (!input.getArrayData()->isVectorData()) { + if (!input.get()->isVectorData()) { return input.values(); } return input; diff --git a/hphp/runtime/base/type_array.h b/hphp/runtime/base/type_array.h index e93ed53b2..de4771f35 100644 --- a/hphp/runtime/base/type_array.h +++ b/hphp/runtime/base/type_array.h @@ -450,10 +450,6 @@ class Array : protected SmartPtr { void dump(); - ArrayData *getArrayData() const { - return m_px; - } - void setEvalScalar() const; private: