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