[Chore] (All): Format code.

This commit is contained in:
BZLZHH
2025-10-27 12:03:05 +08:00
parent 034aeb9b12
commit 47ea1788db
3 changed files with 3 additions and 5 deletions
@@ -114,11 +114,10 @@ namespace MobileGL {
} }
SizeT locNeedle = 0; SizeT locNeedle = 0;
for (auto index: unallocatedUniformIndex) { for (auto index : unallocatedUniformIndex) {
auto& uniform = m_program->getUniform(index); auto& uniform = m_program->getUniform(index);
for (; locNeedle <= m_maxUniformLocation; locNeedle++) { for (; locNeedle <= m_maxUniformLocation; locNeedle++) {
if (m_uniformTypes[locNeedle] != GL_ZERO) if (m_uniformTypes[locNeedle] != GL_ZERO) continue;
continue;
// Found a vacant location at locNeedle // Found a vacant location at locNeedle
m_uniformNames[locNeedle] = uniform.name; m_uniformNames[locNeedle] = uniform.name;
m_uniformTypes[locNeedle] = uniform.glDefineType; m_uniformTypes[locNeedle] = uniform.glDefineType;
@@ -25,8 +25,7 @@ namespace MobileGL {
Uint GetMaxUniformLocation() const { return m_maxUniformLocation; } Uint GetMaxUniformLocation() const { return m_maxUniformLocation; }
Int GetUniformLocation(const String& name) { Int GetUniformLocation(const String& name) {
const auto it = m_uniformLocations.find(name); const auto it = m_uniformLocations.find(name);
if (it == m_uniformLocations.end()) if (it == m_uniformLocations.end()) return -1;
return -1;
return (Int)it->second; return (Int)it->second;
} }
GLenum GetUniformType(Uint index) const { return m_uniformTypes[index]; } GLenum GetUniformType(Uint index) const { return m_uniformTypes[index]; }
Regular → Executable
View File