mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
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:
committed by
Compute-Runtime-Automation
parent
9be5efe4f7
commit
d9f6757378
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user