mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-21 07:25:39 -04:00
Misc: Swap make_array() for size deduction
This commit is contained in:
@ -29,7 +29,6 @@ add_library(common
|
||||
layered_settings_interface.h
|
||||
log.cpp
|
||||
log.h
|
||||
make_array.h
|
||||
memmap.cpp
|
||||
memmap.h
|
||||
md5_digest.cpp
|
||||
|
@ -24,7 +24,6 @@
|
||||
<ClInclude Include="layered_settings_interface.h" />
|
||||
<ClInclude Include="log.h" />
|
||||
<ClInclude Include="lru_cache.h" />
|
||||
<ClInclude Include="make_array.h" />
|
||||
<ClInclude Include="memmap.h" />
|
||||
<ClInclude Include="memory_settings_interface.h" />
|
||||
<ClInclude Include="md5_digest.h" />
|
||||
|
@ -21,7 +21,6 @@
|
||||
<ClInclude Include="dimensional_array.h" />
|
||||
<ClInclude Include="image.h" />
|
||||
<ClInclude Include="minizip_helpers.h" />
|
||||
<ClInclude Include="make_array.h" />
|
||||
<ClInclude Include="thirdparty\StackWalker.h">
|
||||
<Filter>thirdparty</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1,15 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
||||
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
||||
|
||||
#pragma once
|
||||
#include <array>
|
||||
#include <type_traits>
|
||||
|
||||
// Source: https://gist.github.com/klmr/2775736#file-make_array-hpp
|
||||
|
||||
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::forward<T>(values)...};
|
||||
}
|
Reference in New Issue
Block a user