1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Use more concise stdlib type aliases

This commit is contained in:
reuk 2022-09-08 12:41:54 +01:00
parent 21d87c02c2
commit 7c14c1fcd7
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
36 changed files with 438 additions and 494 deletions

View file

@ -992,7 +992,7 @@ private:
#if JUCE_WINDOWS && ! JUCE_MINGW
#define JUCE_CHECKED_ITERATOR(msg, size) \
stdext::checked_array_iterator<typename std::remove_reference<decltype (msg)>::type> ((msg), (size_t) (size))
stdext::checked_array_iterator<std::remove_reference_t<decltype (msg)>> ((msg), (size_t) (size))
#else
#define JUCE_CHECKED_ITERATOR(msg, size) (msg)
#endif

View file

@ -38,35 +38,35 @@ class Packet
public:
Packet() = default;
template <size_t w = numWords, typename std::enable_if<w == 1, int>::type = 0>
template <size_t w = numWords, std::enable_if_t<w == 1, int> = 0>
Packet (uint32_t a)
: contents { { a } }
{
jassert (Utils::getNumWordsForMessageType (a) == 1);
}
template <size_t w = numWords, typename std::enable_if<w == 2, int>::type = 0>
template <size_t w = numWords, std::enable_if_t<w == 2, int> = 0>
Packet (uint32_t a, uint32_t b)
: contents { { a, b } }
{
jassert (Utils::getNumWordsForMessageType (a) == 2);
}
template <size_t w = numWords, typename std::enable_if<w == 3, int>::type = 0>
template <size_t w = numWords, std::enable_if_t<w == 3, int> = 0>
Packet (uint32_t a, uint32_t b, uint32_t c)
: contents { { a, b, c } }
{
jassert (Utils::getNumWordsForMessageType (a) == 3);
}
template <size_t w = numWords, typename std::enable_if<w == 4, int>::type = 0>
template <size_t w = numWords, std::enable_if_t<w == 4, int> = 0>
Packet (uint32_t a, uint32_t b, uint32_t c, uint32_t d)
: contents { { a, b, c, d } }
{
jassert (Utils::getNumWordsForMessageType (a) == 4);
}
template <size_t w, typename std::enable_if<w == numWords, int>::type = 0>
template <size_t w, std::enable_if_t<w == numWords, int> = 0>
explicit Packet (const std::array<uint32_t, w>& fullPacket)
: contents (fullPacket)
{