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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário