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

Method prepend

src/common/StatusArg.cpp:213–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void StatusVector::ImplStatusVector::prepend(const StatusVector& v) throw()
214{
215 auto errFrom = v.implementation->value();
216 auto lenFrom = v.implementation->firstWarning() ? v.implementation->firstWarning() : v.implementation->length();
217 auto errTo = value();
218 auto lenTo = firstWarning() ? firstWarning() : length();
219
220 if (lenFrom < lenTo && fb_utils::cmpStatus(lenFrom, errFrom, errTo))
221 return; // already here - ToDo: check warnings
222
223 ImplStatusVector newVector(getKind(), getCode());
224
225 if (newVector.appendErrors(v.implementation))
226 {
227 if (newVector.appendErrors(this))
228 {
229 if (newVector.appendWarnings(v.implementation))
230 newVector.appendWarnings(this);
231 }
232 }
233
234 *this = newVector;
235}
236
237StatusVector::ImplStatusVector& StatusVector::ImplStatusVector::operator=(const StatusVector::ImplStatusVector& src)
238{

Callers 3

rollbackMethod · 0.45
resetSessionMethod · 0.45
composeMethod · 0.45

Calls 8

cmpStatusFunction · 0.85
appendErrorsMethod · 0.80
appendWarningsMethod · 0.80
valueClass · 0.50
lengthFunction · 0.50
valueMethod · 0.45
firstWarningMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected