Lines Matching refs:pResult
199 static int crSaIntersected(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
202 CrSaClear(pResult);
208 rc = CrSaAdd(pResult, pArray1->pElements[i]);
256 VBOXSADECL(int) CrSaIntersected(CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
258 return crSaIntersected(pArray1, pArray2, pResult);
261 static int crSaUnited(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
264 CrSaClear(pResult);
288 rc = crSaInsAt(pResult, cResult++, element);
319 rc = crSaInsAt(pResult, cResult++, pTail->pElements[iTail]);
331 VBOXSADECL(int) CrSaUnited(const CR_SORTARRAY *pArray1, const CR_SORTARRAY *pArray2, CR_SORTARRAY *pResult)
333 return crSaUnited(pArray1, pArray2, pResult);
336 static int crSaClone(const CR_SORTARRAY *pArray1, CR_SORTARRAY *pResult)
339 CrSaClear(pResult);
341 if (pArray1->cSize > pResult->cBufferSize)
343 CrSaCleanup(pResult);
345 uint64_t *pNew = (uint64_t*)RTMemAlloc(cNewBufferSize * sizeof (pResult->pElements[0]));
352 pResult->pElements = pNew;
353 pResult->cBufferSize = cNewBufferSize;
354 crSaValidate(pResult);
357 pResult->cSize = pArray1->cSize;
358 memcpy(pResult->pElements, pArray1->pElements, pArray1->cSize * sizeof (pArray1->pElements[0]));
366 VBOXSADECL(int) CrSaClone(const CR_SORTARRAY *pArray1, CR_SORTARRAY *pResult)
368 return crSaClone(pArray1, pResult);