Skip to content

Commit e942177

Browse files
committed
Fix conversion warnings in TableValueFunctionScan
1 parent 496ca31 commit e942177

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/jrd/recsrc/TableValueFunctionScan.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ void UnlistFunctionScan::internalOpen(thread_db* tdbb) const
242242
if (size > 0)
243243
{
244244
dsc fromDesc;
245-
fromDesc.makeText(size, textType, (UCHAR*)(IPTR) valueView.data());
245+
fromDesc.makeText(static_cast<USHORT>(size), textType,
246+
(UCHAR*)(IPTR) valueView.data());
246247
assignParameter(tdbb, &fromDesc, toDesc, 0, record);
247248
impure->m_recordBuffer->store(record);
248249
}
@@ -307,17 +308,19 @@ bool UnlistFunctionScan::nextBuffer(thread_db* tdbb) const
307308
impure->m_resultStr->erase();
308309
do
309310
{
310-
auto size = end = valueView.find(separatorView);
311+
const auto size = end = valueView.find(separatorView);
311312
if (end == std::string_view::npos)
312313
{
313314
if (!valueView.empty())
314-
impure->m_resultStr->append(valueView.data(), valueView.length());
315+
impure->m_resultStr->append(valueView.data(),
316+
static_cast<string::size_type>(valueView.length()));
315317

316318
break;
317319
}
318320

319321
if (size > 0)
320-
impure->m_resultStr->append(valueView.data(), size);
322+
impure->m_resultStr->append(valueView.data(),
323+
static_cast<string::size_type>(size));
321324

322325
valueView.remove_prefix(size + separatorView.length());
323326

0 commit comments

Comments
 (0)