From 47ea1788dbaa5e6d946e4fea46e28afecfe5b239 Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Mon, 27 Oct 2025 12:03:05 +0800 Subject: [PATCH] [Chore] (All): Format code. --- MobileGL/MG_State/GLState/ProgramState/ProgramObject.cpp | 5 ++--- MobileGL/MG_State/GLState/ProgramState/ProgramObject.h | 3 +-- scripts/format_code.sh | 0 3 files changed, 3 insertions(+), 5 deletions(-) mode change 100644 => 100755 scripts/format_code.sh diff --git a/MobileGL/MG_State/GLState/ProgramState/ProgramObject.cpp b/MobileGL/MG_State/GLState/ProgramState/ProgramObject.cpp index ade6c8cb..67a8a98d 100644 --- a/MobileGL/MG_State/GLState/ProgramState/ProgramObject.cpp +++ b/MobileGL/MG_State/GLState/ProgramState/ProgramObject.cpp @@ -114,11 +114,10 @@ namespace MobileGL { } SizeT locNeedle = 0; - for (auto index: unallocatedUniformIndex) { + for (auto index : unallocatedUniformIndex) { auto& uniform = m_program->getUniform(index); for (; locNeedle <= m_maxUniformLocation; locNeedle++) { - if (m_uniformTypes[locNeedle] != GL_ZERO) - continue; + if (m_uniformTypes[locNeedle] != GL_ZERO) continue; // Found a vacant location at locNeedle m_uniformNames[locNeedle] = uniform.name; m_uniformTypes[locNeedle] = uniform.glDefineType; diff --git a/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h b/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h index 5cb84aba..fcb47d2b 100644 --- a/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h +++ b/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h @@ -25,8 +25,7 @@ namespace MobileGL { Uint GetMaxUniformLocation() const { return m_maxUniformLocation; } Int GetUniformLocation(const String& name) { const auto it = m_uniformLocations.find(name); - if (it == m_uniformLocations.end()) - return -1; + if (it == m_uniformLocations.end()) return -1; return (Int)it->second; } GLenum GetUniformType(Uint index) const { return m_uniformTypes[index]; } diff --git a/scripts/format_code.sh b/scripts/format_code.sh old mode 100644 new mode 100755