Convert tv_comparisons/tv_conversions by-pointer TypedValue/Cells to by value

If we're not going to mutate the Cell, it might make sense to
pass it by value rather than pointer to const.  Do folks like this
better?  I can see a couple arguments various ways.  But it does seem
like even if we want to pass it by pointer at the hardware level we
would ideally passing by const reference at the language level, so
this choice would be transparent at callsite code.  This diff doesn't
change anything in tv_helpers.h for now.
Esse commit está contido em:
Jordan DeLong
2013-06-26 22:09:17 -07:00
commit de Sara Golemon
commit 5371743d9d
14 arquivos alterados com 230 adições e 234 exclusões
+2 -2
Ver Arquivo
@@ -184,8 +184,8 @@ bool ArrayData::equal(const ArrayData *v2, bool strict) const {
for (ArrayIter iter(this); iter; ++iter) {
Variant key(iter.first());
if (!v2->exists(key)) return false;
if (!tvEqual(iter.second().asTypedValue(),
v2->get(key).asTypedValue())) {
if (!tvEqual(*iter.second().asTypedValue(),
*v2->get(key).asTypedValue())) {
return false;
}
}