diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-20 21:40:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-21 18:18:56 +0200 |
commit | e4dc1d1a73f17f56e239a39f533f2b7c90129a46 (patch) | |
tree | 1c7bf502559660633f04bb673694ec94920aa378 /vcl | |
parent | 6793ae2504dea490d26cbf9b2ebd33774a66d639 (diff) |
pvs-studio: silence bogus V557
Change-Id: I5aa740afa1143adaf4e2afa5d5e1596497de8323
Reviewed-on: https://gerrit.libreoffice.org/62112
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/win/WinDeviceInfo.cxx | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx index 2a36d57ce9dd..9c48651918a5 100644 --- a/vcl/opengl/win/WinDeviceInfo.cxx +++ b/vcl/opengl/win/WinDeviceInfo.cxx @@ -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]; |