MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / mergeStatus

Function mergeStatus

src/common/utils.cpp:1375–1409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1373}
1374
1375unsigned int mergeStatus(ISC_STATUS* const dest, unsigned int space,
1376 const Firebird::IStatus* from) throw()
1377{
1378 const ISC_STATUS* s;
1379 unsigned int copied = 0;
1380 const int state = from->getState();
1381 ISC_STATUS* to = dest;
1382
1383 if (state & Firebird::IStatus::STATE_ERRORS)
1384 {
1385 s = from->getErrors();
1386 copied = copyStatus(to, space, s, statusLength(s));
1387
1388 to += copied;
1389 space -= copied;
1390 }
1391
1392 if (state & Firebird::IStatus::STATE_WARNINGS)
1393 {
1394 if (!copied)
1395 {
1396 init_status(to);
1397 to += 2;
1398 space -= 2;
1399 copied += 2;
1400 }
1401 s = from->getWarnings();
1402 copied += copyStatus(to, space, s, statusLength(s));
1403 }
1404
1405 if (!copied)
1406 init_status(dest);
1407
1408 return copied;
1409}
1410
1411void copyStatus(Firebird::CheckStatusWrapper* to, const Firebird::IStatus* from) throw()
1412{

Callers 2

gsecFunction · 0.85
mergeMethod · 0.85

Calls 6

copyStatusFunction · 0.85
statusLengthFunction · 0.85
init_statusFunction · 0.85
getStateMethod · 0.45
getErrorsMethod · 0.45
getWarningsMethod · 0.45

Tested by

no test coverage detected