Lines Matching refs:length
45 return SetData(reinterpret_cast<const int8_t *>(data.c_str()), data.length() + 1);
48 bool ResourceItem::SetData(const int8_t *data, uint32_t length)
50 if (data == nullptr || length < 0) {
55 if (length == 0) {
61 int8_t *buffer = reinterpret_cast<int8_t *>(new (nothrow) int8_t[length]);
66 bool result = (memset_s(buffer, length, 0, length) == EOK);
67 result = result && (memcpy_s(buffer, length, data, length) == EOK);
69 dataLen_ = length;