[Libreoffice-commits] core.git: vcl/opengl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Oct 21 16:19:20 UTC 2018
vcl/opengl/win/WinDeviceInfo.cxx | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
New commits:
commit e4dc1d1a73f17f56e239a39f533f2b7c90129a46
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 21:40:20 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 18:18:56 2018 +0200
pvs-studio: silence bogus V557
Change-Id: I5aa740afa1143adaf4e2afa5d5e1596497de8323
Reviewed-on: https://gerrit.libreoffice.org/62112
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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];
More information about the Libreoffice-commits
mailing list