Merge pull request #111347 from Ivorforce/no-algorithm
Add `max()` to `Span`, replacing `<algorithm>` include from `rendering_device_commons.h`
This commit is contained in:
@ -33,8 +33,6 @@
|
||||
#include "core/object/object.h"
|
||||
#include "core/variant/type_info.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#define STEPIFY(m_number, m_alignment) ((((m_number) + ((m_alignment) - 1)) / (m_alignment)) * (m_alignment))
|
||||
|
||||
// This may one day be used in Godot for interoperability between C arrays, Vector and LocalVector.
|
||||
|
||||
@ -70,7 +70,7 @@ class RenderingShaderContainerFormat;
|
||||
template <typename... RESOURCE_TYPES>
|
||||
struct VersatileResourceTemplate {
|
||||
static constexpr size_t RESOURCE_SIZES[] = { sizeof(RESOURCE_TYPES)... };
|
||||
static constexpr size_t MAX_RESOURCE_SIZE = std::max_element(RESOURCE_SIZES, RESOURCE_SIZES + sizeof...(RESOURCE_TYPES))[0];
|
||||
static constexpr size_t MAX_RESOURCE_SIZE = Span(RESOURCE_SIZES).max();
|
||||
uint8_t data[MAX_RESOURCE_SIZE];
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user