1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #111223 from Ivorforce/remove-iterator-include

Replace `std::size` usage with `std_size` to avoid `<iterator>` include.
This commit is contained in:
Thaddeus Crews
2025-10-06 09:06:49 -05:00
39 changed files with 67 additions and 66 deletions

View File

@@ -5282,7 +5282,7 @@ ShaderLanguage::DataType ShaderLanguage::get_scalar_type(DataType p_type) {
TYPE_VOID,
};
static_assert(std::size(scalar_types) == TYPE_MAX);
static_assert(std_size(scalar_types) == TYPE_MAX);
return scalar_types[p_type];
}
@@ -5324,7 +5324,7 @@ int ShaderLanguage::get_cardinality(DataType p_type) {
1,
};
static_assert(std::size(cardinality_table) == TYPE_MAX);
static_assert(std_size(cardinality_table) == TYPE_MAX);
return cardinality_table[p_type];
}
@@ -11369,7 +11369,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
#ifdef DEBUG_ENABLED
// Adds context keywords.
if (keyword_completion_context != CF_UNSPECIFIED) {
constexpr int sz = std::size(keyword_list);
constexpr int sz = std_size(keyword_list);
for (int i = 0; i < sz; i++) {
if (keyword_list[i].flags == CF_UNSPECIFIED) {
break; // Ignore hint keywords (parsed below).

View File

@@ -97,7 +97,7 @@ String ShaderWarning::get_name_from_code(Code p_code) {
PNAME("MAGIC_POSITION_WRITE"),
};
static_assert(std::size(names) == WARNING_MAX, "Amount of warning types don't match the amount of warning names.");
static_assert(std_size(names) == WARNING_MAX, "Amount of warning types don't match the amount of warning names.");
return names[(int)p_code];
}