Kaydet (Commit) 91fcd999 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Get rid of some macros

Change-Id: I9bbb1e41a687b62b32ed00f1c7cf5d82d66b4915
Reviewed-on: https://gerrit.libreoffice.org/67360
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 313ef29f
......@@ -34,25 +34,25 @@ namespace jfw_plugin
the string contains an a umlaut then it must be expressed
by "\xXX\xXX"
*/
BEGIN_VENDOR_MAP()
VendorSupportMapEntry const gVendorMap[] ={
// For macOS, don't bother with implementations that aren't relevant (or have never existed)
#ifdef MACOSX
VENDOR_MAP_ENTRY("Apple Inc.", OtherInfo)
VENDOR_MAP_ENTRY("Apple Computer, Inc.", OtherInfo)
VENDOR_MAP_ENTRY<OtherInfo>("Apple Inc."),
VENDOR_MAP_ENTRY<OtherInfo>("Apple Computer, Inc."),
#endif
VENDOR_MAP_ENTRY("Sun Microsystems Inc.", SunInfo)
VENDOR_MAP_ENTRY("Oracle Corporation", SunInfo)
VENDOR_MAP_ENTRY("AdoptOpenJdk", SunInfo)
VENDOR_MAP_ENTRY("Amazon.com Inc.", SunInfo)
VENDOR_MAP_ENTRY<SunInfo>("Sun Microsystems Inc."),
VENDOR_MAP_ENTRY<SunInfo>("Oracle Corporation"),
VENDOR_MAP_ENTRY<SunInfo>("AdoptOpenJdk"),
VENDOR_MAP_ENTRY<SunInfo>("Amazon.com Inc."),
#ifndef MACOSX
VENDOR_MAP_ENTRY("IBM Corporation", OtherInfo)
VENDOR_MAP_ENTRY("Blackdown Java-Linux Team", OtherInfo)
VENDOR_MAP_ENTRY("BEA Systems, Inc.", OtherInfo)
VENDOR_MAP_ENTRY("Free Software Foundation, Inc.", GnuInfo)
VENDOR_MAP_ENTRY("The FreeBSD Foundation", OtherInfo)
VENDOR_MAP_ENTRY<OtherInfo>("IBM Corporation"),
VENDOR_MAP_ENTRY<OtherInfo>("Blackdown Java-Linux Team"),
VENDOR_MAP_ENTRY<OtherInfo>("BEA Systems, Inc."),
VENDOR_MAP_ENTRY<GnuInfo>("Free Software Foundation, Inc."),
VENDOR_MAP_ENTRY<OtherInfo>("The FreeBSD Foundation"),
#endif
VENDOR_MAP_ENTRY("Azul Systems, Inc.", OtherInfo)
END_VENDOR_MAP()
VENDOR_MAP_ENTRY<OtherInfo>("Azul Systems, Inc."),
{nullptr, nullptr, nullptr} };
bool isVendorSupported(const OUString& sVendor)
......
......@@ -37,14 +37,9 @@ struct VendorSupportMapEntry
extern VendorSupportMapEntry const gVendorMap[];
#define BEGIN_VENDOR_MAP() \
VendorSupportMapEntry const gVendorMap[] ={
#define VENDOR_MAP_ENTRY(x,y) \
{x, & y::getJavaExePaths, & y::createInstance},
#define END_VENDOR_MAP() \
{nullptr, nullptr, nullptr} };
template<typename y> constexpr VendorSupportMapEntry VENDOR_MAP_ENTRY(char const * x) {
return {x, & y::getJavaExePaths, & y::createInstance};
}
/* Examines if the vendor supplied in parameter sVendor is part of the
list of supported vendors. That is the arry of VendorSupportMapEntry
......
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