Change return type from unique_ptr to vector

In some of the drm functions there is a pattern
to store array in unique_ptr and pass it's length
as an argument. This commit simplifies this.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-12-22 14:25:53 +00:00
committed by Compute-Runtime-Automation
parent 9be5efe4f7
commit d9f6757378
25 changed files with 187 additions and 228 deletions

View File

@@ -42,7 +42,7 @@ template <>
struct Mock<MemoryNeoDrm> : public MemoryNeoDrm {
Mock<MemoryNeoDrm>(RootDeviceEnvironment &rootDeviceEnvironment) : MemoryNeoDrm(rootDeviceEnvironment) {}
bool queryMemoryInfoMockPositiveTest() {
MemoryRegion regionInfo[2] = {};
std::vector<MemoryRegion> regionInfo(2);
regionInfo[0].region = {I915_MEMORY_CLASS_SYSTEM, 0};
regionInfo[0].probedSize = probedSizeRegionZero;
regionInfo[0].unallocatedSize = unallocatedSizeRegionZero;
@@ -50,7 +50,7 @@ struct Mock<MemoryNeoDrm> : public MemoryNeoDrm {
regionInfo[1].probedSize = probedSizeRegionOne;
regionInfo[1].unallocatedSize = unallocatedSizeRegionOne;
this->memoryInfo.reset(new MemoryInfo(regionInfo, 2));
this->memoryInfo.reset(new MemoryInfo(regionInfo));
return true;
}