Remove Variant::GetTypedAccessor

This stuff almost is an abstraction layer, but it's in a
strange place.  Also, the layout of TypedValue isn't something we've
been using through an abstraction layer, and if we want to later I
think we won't want to do so using this one.
Esse commit está contido em:
Jordan DeLong
2013-06-09 15:41:08 -07:00
commit de sgolemon
commit 9e56c78038
16 arquivos alterados com 176 adições e 291 exclusões
+10 -6
Ver Arquivo
@@ -177,12 +177,16 @@ void StringBuffer::append(int64_t n) {
}
void StringBuffer::append(CVarRef v) {
Variant::TypedValueAccessor tva = v.getTypedAccessor();
if (Variant::IsString(tva)) {
append(Variant::GetAsString(tva));
} else if (IS_INT_TYPE(Variant::GetAccessorType(tva))) {
append(Variant::GetInt64(tva));
} else {
auto const cell = v.asCell();
switch (cell->m_type) {
case KindOfStaticString:
case KindOfString:
append(cell->m_data.pstr);
break;
case KindOfInt64:
append(cell->m_data.num);
break;
default:
append(v.toString());
}
}