# HG changeset patch
# User Martin Gieseking <martin.gieseking@uos.de>
# Date 1555578878 -7200
#      Thu Apr 18 11:14:38 2019 +0200
# Node ID 4fa1e45d2e2a5b50e385244813b3b8a34629a1f5
# Parent  736ab658460f07a5019a7cf049465ac1e14a3a2c
removed util::make_array() due to compatibility issues

diff --git a/src/optimizer/AttributeExtractor.cpp b/src/optimizer/AttributeExtractor.cpp
--- a/src/optimizer/AttributeExtractor.cpp
+++ b/src/optimizer/AttributeExtractor.cpp
@@ -113,14 +113,14 @@
  *  @return true if the element is groupable */
 bool AttributeExtractor::groupable (const XMLElement &elem) {
 	// https://www.w3.org/TR/SVG/struct.html#GElement
-	static constexpr auto names = util::make_array(
+	static const char *names[] = {
 		"a", "altGlyphDef", "animate", "animateColor", "animateMotion", "animateTransform",
 		"circle", "clipPath", "color-profile", "cursor", "defs", "desc", "ellipse", "filter",
 		"font", "font-face", "foreignObject", "g", "image", "line", "linearGradient", "marker",
 		"mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "set",
 		"style", "switch", "symbol", "text", "title", "use", "view"
-	);
-	return binary_search(names.begin(), names.end(), elem.name(), [](const string &name1, const string &name2) {
+	};
+	return binary_search(begin(names), end(names), elem.name(), [](const string &name1, const string &name2) {
 		return name1 < name2;
 	});
 }
@@ -136,15 +136,15 @@
 	// clip-path is not inheritable but can be moved to the parent element as long as
 	// no child gets an different clip-path attribute
 	// https://www.w3.org/TR/SVG11/styling.html#Inheritance
-	static constexpr auto names = util::make_array(
+	static const char *names[] = {
 		"clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile",
 		"color-rendering", "direction", "fill", "fill-opacity", "fill-rule", "font", "font-family", "font-size",
 		"font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "glyph-orientation-horizontal",
 		"glyph-orientation-vertical", "letter-spacing", "paint-order", "stroke", "stroke-dasharray", "stroke-dashoffset",
 		"stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "transform",
 		"visibility", "word-spacing", "writing-mode"
-	);
-	return binary_search(names.begin(), names.end(), attrib.name, [](const string &name1, const string &name2) {
+	};
+	return binary_search(begin(names), end(names), attrib.name, [](const string &name1, const string &name2) {
 		return name1 < name2;
 	});
 }
@@ -159,13 +159,13 @@
 	// the 'fill' attribute of animation elements has different semantics than
 	// that of graphics elements => don't extract it from animation nodes
 	// https://www.w3.org/TR/SVG11/animate.html#TimingAttributes
-	static constexpr auto names = util::make_array(
+	static const char *names[] = {
 		"animate", "animateColor", "animateMotion", "animateTransform", "set"
-	);
-	auto it = find_if(names.begin(), names.end(), [&](const string &name) {
+	};
+	auto it = find_if(begin(names), end(names), [&](const string &name) {
 		return element.name() == name;
 	});
-	return it == names.end();
+	return it == end(names);
 }
 
 
diff --git a/src/optimizer/GroupCollapser.cpp b/src/optimizer/GroupCollapser.cpp
--- a/src/optimizer/GroupCollapser.cpp
+++ b/src/optimizer/GroupCollapser.cpp
@@ -132,13 +132,13 @@
 bool GroupCollapser::collapsible (const XMLElement &element) {
 	// the 'fill' attribute of animation elements has different semantics than
 	// that of graphics elements => don't collapse them
-	static constexpr auto names = util::make_array(
+	static const char *names[] = {
 		"animate", "animateColor", "animateMotion", "animateTransform", "set"
-	);
-	auto it = find_if(names.begin(), names.end(), [&](const string &name) {
+	};
+	auto it = find_if(begin(names), end(names), [&](const string &name) {
 		return element.name() == name;
 	});
-	return it == names.end();
+	return it == end(names);
 }
 
 
@@ -155,11 +155,11 @@
 		}
 	}
 	// these attributes prevent a group from being unwrapped
-	static constexpr auto attribs = util::make_array(
+	static const char *attribs[] = {
 		"class", "id", "filter", "mask", "style"
-	);
-	auto it = find_if(attribs.begin(), attribs.end(), [&](const string &name) {
+	};
+	auto it = find_if(begin(attribs), end(attribs), [&](const string &name) {
 		return source.hasAttribute(name) || dest.hasAttribute(name);
 	});
-	return it == attribs.end();
+	return it == end(attribs);
 }
diff --git a/src/utility.hpp b/src/utility.hpp
--- a/src/utility.hpp
+++ b/src/utility.hpp
@@ -103,15 +103,6 @@
     return std::unique_ptr<T>{static_cast<T*>(old.release())};
 }
 
-
-template <typename... T>
-constexpr auto make_array (T&&... values) ->
-	std::array<typename std::decay<typename std::common_type<T...>::type>::type, sizeof...(T)> {
-		return std::array<typename std::decay<typename std::common_type<T...>::type>::type, sizeof...(T)>{
-			std::forward<T>(values)...
-		};
-	}
-
 } // namespace util
 
 #endif
