Kaydet (Commit) e4dc1d1a authored tarafından Caolán McNamara's avatar Caolán McNamara

pvs-studio: silence bogus V557

Change-Id: I5aa740afa1143adaf4e2afa5d5e1596497de8323
Reviewed-on: https://gerrit.libreoffice.org/62112
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6793ae25
......@@ -831,12 +831,6 @@ void WinOpenGLDeviceInfo::GetData()
}
}
// Macro for assigning a device vendor id to a string.
#define DECLARE_VENDOR_ID(name, deviceId) \
case name: \
*mpDeviceVendors[id] = deviceId; \
break;
OUString WinOpenGLDeviceInfo::GetDeviceVendor(wgl::DeviceVendor id)
{
assert(id >= 0 && id < wgl::DeviceVendorMax);
......@@ -848,14 +842,26 @@ OUString WinOpenGLDeviceInfo::GetDeviceVendor(wgl::DeviceVendor id)
switch (id)
{
DECLARE_VENDOR_ID(wgl::VendorAll, "");
DECLARE_VENDOR_ID(wgl::VendorIntel, "0x8086");
DECLARE_VENDOR_ID(wgl::VendorNVIDIA, "0x10de");
DECLARE_VENDOR_ID(wgl::VendorAMD, "0x1022");
DECLARE_VENDOR_ID(wgl::VendorATI, "0x1002");
DECLARE_VENDOR_ID(wgl::VendorMicrosoft, "0x1414");
// Suppress a warning.
DECLARE_VENDOR_ID(wgl::DeviceVendorMax, "");
case wgl::VendorAll:
*mpDeviceVendors[id] = "";
break;
case wgl::VendorIntel:
*mpDeviceVendors[id] = "0x8086";
break;
case wgl::VendorNVIDIA:
*mpDeviceVendors[id] = "0x10de";
break;
case wgl::VendorAMD:
*mpDeviceVendors[id] = "0x1022";
break;
case wgl::VendorATI:
*mpDeviceVendors[id] = "0x1002";
break;
case wgl::VendorMicrosoft:
*mpDeviceVendors[id] = "0x1414";
break;
case wgl::DeviceVendorMax: // Suppress a warning.
break;
}
return *mpDeviceVendors[id];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment