Fix build failing with make

Issue:
Error while building with make: array must be initialized with a brace enclosed initializer

Fix:
Enclosing array initialisation with proper braces.
This commit is contained in:
root 2019-02-13 11:47:05 +05:30
parent d93842db3e
commit 5ee897275f
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ namespace shrpx {
namespace {
// List of API endpoints
const std::array<APIEndpoint, 2> &apis() {
static const auto apis = new std::array<APIEndpoint, 2>{
static const auto apis = new std::array<APIEndpoint, 2>{{
APIEndpoint{
StringRef::from_lit("/api/v1beta1/backendconfig"),
true,
@ -54,7 +54,7 @@ const std::array<APIEndpoint, 2> &apis() {
(1 << API_METHOD_GET),
&APIDownstreamConnection::handle_configrevision,
},
};
}};
return *apis;
}