While working on removing out parameters, we noticed code that makes
assumption that wchar_t is always 16 bits.
virtual void PdxInstance::getField(const char* fieldName, wchar_t& value)
const = 0;
void PdxInstanceImpl::getField(const char* fieldname, wchar_t& value) const
{
auto dataInput = getDataInputForField(fieldname);
uint16_t temp = dataInput->readInt16();
value = static_cast<wchar_t>(temp);
}
According to cppreference[1], this assumption is incorrect. If that is the
case, should this implementation be fixed or can it be deleted altogether?
Thanks,
David
[1] http://en.cppreference.com/w/cpp/language/types