diff --git a/MobileGL/MG_Impl/EGLImpl/Temporary/TemporaryEGLImpl.cpp b/MobileGL/MG_Impl/EGLImpl/Temporary/TemporaryEGLImpl.cpp index 34f26b53..d7e93b07 100644 --- a/MobileGL/MG_Impl/EGLImpl/Temporary/TemporaryEGLImpl.cpp +++ b/MobileGL/MG_Impl/EGLImpl/Temporary/TemporaryEGLImpl.cpp @@ -2,7 +2,7 @@ namespace MobileGL { namespace MG_Impl::EGLImpl { - // TODO: Implement complete EGL functionality + // TODO: implement complete EGL functionality EGLSurface CreateWindowSurface(EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint* attrib_list) { diff --git a/MobileGL/MG_Impl/GLImpl/Buffer/GL_Buffer.cpp b/MobileGL/MG_Impl/GLImpl/Buffer/GL_Buffer.cpp index 9abb3c52..dd294058 100644 --- a/MobileGL/MG_Impl/GLImpl/Buffer/GL_Buffer.cpp +++ b/MobileGL/MG_Impl/GLImpl/Buffer/GL_Buffer.cpp @@ -216,8 +216,8 @@ namespace MobileGL { } void* MapBuffer_State(GLenum target, GLenum access) { - bool readable = access == GL_READ_ONLY || access == GL_READ_WRITE; - bool writable = access == GL_WRITE_ONLY || access == GL_READ_WRITE; + Bool readable = access == GL_READ_ONLY || access == GL_READ_WRITE; + Bool writable = access == GL_WRITE_ONLY || access == GL_READ_WRITE; if (access != GL_READ_ONLY && access != GL_WRITE_ONLY && access != GL_READ_WRITE) { MG_State::pGLContext->RecordError( ErrorCode::InvalidEnum, diff --git a/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp b/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp index 4325e231..0cda7813 100644 --- a/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp +++ b/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp @@ -7,7 +7,7 @@ namespace MobileGL::MG_Impl::GLImpl { namespace BufferImpl { - bool ValidateBufferTarget(BufferTarget target) { + Bool ValidateBufferTarget(BufferTarget target) { if (target == BufferTarget::Unknown) { using namespace MG_Util; String bufferTargetStr = ConvertBufferTargetToString(target); @@ -31,8 +31,8 @@ namespace MobileGL::MG_Impl::GLImpl { return true; } - bool ValidateBufferName(Uint index) { - bool isValid = MG_State::pGLContext->ValidateBufferName(index); + Bool ValidateBufferName(Uint index) { + Bool isValid = MG_State::pGLContext->ValidateBufferName(index); if (isValid) return true; MG_State::pGLContext->RecordError( ErrorCode::InvalidOperation, @@ -41,7 +41,7 @@ namespace MobileGL::MG_Impl::GLImpl { return false; } - bool ValidateBufferUsage(BufferUsage usage) { + Bool ValidateBufferUsage(BufferUsage usage) { if (usage != BufferUsage::Unknown) { return true; } @@ -56,7 +56,7 @@ namespace MobileGL::MG_Impl::GLImpl { return false; } - bool ValidateBufferMappingAccess(Flags accessBits) { + Bool ValidateBufferMappingAccess(Flags accessBits) { if (accessBits == BufferMappingAccessBit::Null) { MG_State::pGLContext->RecordError(ErrorCode::InvalidEnum, MakeShared("MG_Impl/GLImpl/BufferImpl", diff --git a/MobileGL/MG_Impl/GLImpl/Buffer/Validators.h b/MobileGL/MG_Impl/GLImpl/Buffer/Validators.h index a1cb97ca..65e8c1bc 100644 --- a/MobileGL/MG_Impl/GLImpl/Buffer/Validators.h +++ b/MobileGL/MG_Impl/GLImpl/Buffer/Validators.h @@ -4,9 +4,9 @@ namespace MobileGL::MG_Impl::GLImpl { namespace BufferImpl { - bool ValidateBufferTarget(BufferTarget target); - bool ValidateBufferName(Uint index); - bool ValidateBufferUsage(BufferUsage usage); - bool ValidateBufferMappingAccess(Flags accessBits); + Bool ValidateBufferTarget(BufferTarget target); + Bool ValidateBufferName(Uint index); + Bool ValidateBufferUsage(BufferUsage usage); + Bool ValidateBufferMappingAccess(Flags accessBits); } // namespace BufferImpl } // namespace MobileGL::MG_Impl::GLImpl \ No newline at end of file diff --git a/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp b/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp index a964e2e4..4c479e55 100644 --- a/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp +++ b/MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp @@ -78,7 +78,7 @@ namespace MobileGL { } static Vector extStrings; - static bool initialized = false; + static Bool initialized = false; if (!initialized) { extStrings.reserve(exts.size()); for (const auto& ext : exts) { @@ -93,7 +93,7 @@ namespace MobileGL { void GetIntegerv(GLenum pname, GLint* params) { MGLOG_D("glGetIntegerv, pname: %s", MG_Util::ConvertGLEnumToString(pname).c_str()); if (!params) { - // TODO: Report GL_INVALID_VALUE. + // TODO: report GL_INVALID_VALUE. return; } @@ -122,7 +122,7 @@ namespace MobileGL { // Others... default: MGLOG_E("glGetIntegerv: Invalid enum %s (0x%X)", MG_Util::ConvertGLEnumToString(pname).c_str(), pname); - // TODO: Report GL_INVALID_ENUM. + // TODO: report GL_INVALID_ENUM. break; } } diff --git a/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp b/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp index 188c25a1..fc0bad81 100644 --- a/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp +++ b/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp @@ -36,7 +36,7 @@ namespace MobileGL { vao->EnableAttribute(index); } - // TODO: Implement GL_BGRA support + // TODO: implement GL_BGRA support void VertexAttribIPointer_State(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) { if (!VertexArrayImpl::ValidateVertexAttributeIndex(index)) return; @@ -68,7 +68,7 @@ namespace MobileGL { vao->BindAttributeBuffer(index, vbo); } - // TODO: Implement GL_BGRA support + // TODO: implement GL_BGRA support void VertexAttribPointer_State(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) { if (!VertexArrayImpl::ValidateVertexAttributeIndex(index)) return; diff --git a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp index 54aefb0f..b0dd360a 100644 --- a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp +++ b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp @@ -7,7 +7,7 @@ namespace MobileGL::MG_Impl::GLImpl { namespace VertexArrayImpl { - bool ValidateVertexArrayName(Uint index) { + Bool ValidateVertexArrayName(Uint index) { if (index == 0) { MG_State::pGLContext->RecordError( ErrorCode::InvalidValue, MakeShared("MG_Impl/GLImpl", "ValidateVertexArrayName", @@ -15,7 +15,7 @@ namespace MobileGL::MG_Impl::GLImpl { return false; } - bool isValid = MG_State::pGLContext->ValidateVertexArrayName(index); + Bool isValid = MG_State::pGLContext->ValidateVertexArrayName(index); if (!isValid) { MG_State::pGLContext->RecordError( ErrorCode::InvalidOperation, @@ -26,7 +26,7 @@ namespace MobileGL::MG_Impl::GLImpl { return true; } - bool ValidateVertexArrayObject(Uint index) { + Bool ValidateVertexArrayObject(Uint index) { if (!MG_State::pGLContext->ValidateVertexArrayObject(index)) { MG_State::pGLContext->RecordError( ErrorCode::InvalidOperation, @@ -37,7 +37,7 @@ namespace MobileGL::MG_Impl::GLImpl { return true; } - bool ValidateVertexAttributeIndex(Uint index) { + Bool ValidateVertexAttributeIndex(Uint index) { if (index >= MG_State::GLState::VertexArrayObject::MAX_VERTEX_ATTRIBS) { MG_State::pGLContext->RecordError( ErrorCode::InvalidValue, @@ -50,7 +50,7 @@ namespace MobileGL::MG_Impl::GLImpl { return true; } - bool ValidateVertexAttribPointerParams(Uint index, SizeT size, DataType type, Int stride) { + Bool ValidateVertexAttribPointerParams(Uint index, SizeT size, DataType type, Int stride) { if (size < 1 || size > 4) { MG_State::pGLContext->RecordError( ErrorCode::InvalidValue, diff --git a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h index 168060b1..f7bbd0e0 100644 --- a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h +++ b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h @@ -4,9 +4,9 @@ namespace MobileGL::MG_Impl::GLImpl { namespace VertexArrayImpl { - bool ValidateVertexArrayName(Uint index); - bool ValidateVertexArrayObject(Uint index); - bool ValidateVertexAttributeIndex(Uint index); - bool ValidateVertexAttribPointerParams(Uint index, SizeT size, DataType type, Int stride); + Bool ValidateVertexArrayName(Uint index); + Bool ValidateVertexArrayObject(Uint index); + Bool ValidateVertexAttributeIndex(Uint index); + Bool ValidateVertexAttribPointerParams(Uint index, SizeT size, DataType type, Int stride); } // namespace VertexArrayImpl } // namespace MobileGL::MG_Impl::GLImpl \ No newline at end of file diff --git a/MobileGL/MG_Impl/GLXImpl/LookUp/LookUp.cpp b/MobileGL/MG_Impl/GLXImpl/LookUp/LookUp.cpp index fe02266f..a35ee2e0 100644 --- a/MobileGL/MG_Impl/GLXImpl/LookUp/LookUp.cpp +++ b/MobileGL/MG_Impl/GLXImpl/LookUp/LookUp.cpp @@ -1,7 +1,7 @@ #include "LookUp.h" namespace MG_Impl::GLXImpl { - // TODO: Implement complete GLX functionality + // TODO: implement complete GLX functionality void* GetProcAddress(const char* name) { MGLOG_D("glXGetProcAddress(\"%s\")", name); diff --git a/MobileGL/MG_State/GLState/BufferState/BufferObject.h b/MobileGL/MG_State/GLState/BufferState/BufferObject.h index 20a85189..b6dfcb4c 100644 --- a/MobileGL/MG_State/GLState/BufferState/BufferObject.h +++ b/MobileGL/MG_State/GLState/BufferState/BufferObject.h @@ -82,7 +82,7 @@ namespace MobileGL { Range1D m_dirtyRange; Range1D m_mappedRange; std::vector m_stagingData; - bool m_ownsStagingData; + Bool m_ownsStagingData; }; } // namespace GLState } // namespace MG_State diff --git a/MobileGL/MG_State/GLState/BufferState/BufferState.cpp b/MobileGL/MG_State/GLState/BufferState/BufferState.cpp index daf23965..e46ff7af 100644 --- a/MobileGL/MG_State/GLState/BufferState/BufferState.cpp +++ b/MobileGL/MG_State/GLState/BufferState/BufferState.cpp @@ -53,11 +53,11 @@ namespace MobileGL { } } - bool BufferState::ValidateName(Uint index) const { + Bool BufferState::ValidateName(Uint index) const { return m_indexGenerator.IsValid(index); } - bool BufferState::ValidateBufferObject(Uint index) const { + Bool BufferState::ValidateBufferObject(Uint index) const { return m_bufferObjects.find(index) != m_bufferObjects.end(); } } // namespace GLState diff --git a/MobileGL/MG_State/GLState/BufferState/BufferState.h b/MobileGL/MG_State/GLState/BufferState/BufferState.h index 7938aebf..240565c9 100644 --- a/MobileGL/MG_State/GLState/BufferState/BufferState.h +++ b/MobileGL/MG_State/GLState/BufferState/BufferState.h @@ -1,7 +1,7 @@ #pragma once #include -#include "BufferObject.h" #include +#include "BufferObject.h" namespace MobileGL { namespace MG_State { @@ -21,8 +21,8 @@ namespace MobileGL { SharedPtr CreateBufferObject(Uint index); BindingSlot& GetBindingSlot(BufferTarget target); void MarkBufferObjectForDeletion(Uint index); - bool ValidateName(Uint index) const; - bool ValidateBufferObject(Uint index) const; + Bool ValidateName(Uint index) const; + Bool ValidateBufferObject(Uint index) const; private: UnorderedMap> m_bufferObjects; diff --git a/MobileGL/MG_State/GLState/ErrorState/Error.cpp b/MobileGL/MG_State/GLState/ErrorState/Error.cpp index de381805..c57945b1 100644 --- a/MobileGL/MG_State/GLState/ErrorState/Error.cpp +++ b/MobileGL/MG_State/GLState/ErrorState/Error.cpp @@ -17,7 +17,7 @@ namespace MobileGL { } } - bool ErrorState::HasNonGLError() const { + Bool ErrorState::HasNonGLError() const { return !m_nonGLErrors.empty(); } @@ -33,7 +33,7 @@ namespace MobileGL { return Optional{error}; } - bool ErrorState::HasGLError() const { + Bool ErrorState::HasGLError() const { return !m_errors.empty(); } diff --git a/MobileGL/MG_State/GLState/ErrorState/Error.h b/MobileGL/MG_State/GLState/ErrorState/Error.h index dc7db2f9..d62528cf 100644 --- a/MobileGL/MG_State/GLState/ErrorState/Error.h +++ b/MobileGL/MG_State/GLState/ErrorState/Error.h @@ -14,10 +14,10 @@ namespace MobileGL { class ErrorState { public: void RecordError(ErrorCode code, SharedPtr info = nullptr); - bool HasNonGLError() const; + Bool HasNonGLError() const; Optional PeekNonGLError() const; Optional PopNonGLError(); - bool HasGLError() const; + Bool HasGLError() const; Optional PeekGLError() const; Optional PopGLError(); void Clear(); diff --git a/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h b/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h index 0a8d9426..e5171feb 100644 --- a/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h +++ b/MobileGL/MG_State/GLState/ProgramState/ProgramObject.h @@ -16,9 +16,9 @@ namespace MobileGL { // basically this contains SPIR-V in binary format Vector> m_programBinary; String m_infoLog; - bool m_deleteStatus = false; - bool m_linkStatus = true; - bool m_validateStatus = true; + Bool m_deleteStatus = false; + Bool m_linkStatus = true; + Bool m_validateStatus = true; }; } // namespace GLState } // namespace MG_State diff --git a/MobileGL/MG_State/GLState/ProgramState/ProgramState.h b/MobileGL/MG_State/GLState/ProgramState/ProgramState.h index 5590ead5..ccda4881 100644 --- a/MobileGL/MG_State/GLState/ProgramState/ProgramState.h +++ b/MobileGL/MG_State/GLState/ProgramState/ProgramState.h @@ -15,7 +15,7 @@ namespace MobileGL { void DeleteProgram(Uint program); private: - bool CheckIndexAvail(SizeT idx) { return idx < m_programObjects.size(); } + Bool CheckIndexAvail(SizeT idx) { return idx < m_programObjects.size(); } void EnsureIndexAvail(SizeT idx) { if (CheckIndexAvail(idx)) return; diff --git a/MobileGL/MG_State/GLState/ProgramState/ShaderObject.h b/MobileGL/MG_State/GLState/ProgramState/ShaderObject.h index adcad709..7619f2b2 100644 --- a/MobileGL/MG_State/GLState/ProgramState/ShaderObject.h +++ b/MobileGL/MG_State/GLState/ProgramState/ShaderObject.h @@ -44,8 +44,8 @@ namespace MobileGL { SharedPtr m_shader; std::string m_infoLog; - bool m_deleteStatus = false; - bool m_compileStatus = false; + Bool m_deleteStatus = false; + Bool m_compileStatus = false; }; } // namespace GLState } // namespace MG_State diff --git a/MobileGL/MG_State/GLState/TextureState/TextureObject.cpp b/MobileGL/MG_State/GLState/TextureState/TextureObject.cpp index 237c4a56..da610d42 100644 --- a/MobileGL/MG_State/GLState/TextureState/TextureObject.cpp +++ b/MobileGL/MG_State/GLState/TextureState/TextureObject.cpp @@ -65,7 +65,7 @@ namespace MobileGL { } } - // TODO: Add other texture types as needed + // TODO: add other texture types as needed } // namespace GLState } // namespace MG_State diff --git a/MobileGL/MG_State/GLState/TextureState/TextureObject.h b/MobileGL/MG_State/GLState/TextureState/TextureObject.h index 6c04d3d4..07ce0553 100644 --- a/MobileGL/MG_State/GLState/TextureState/TextureObject.h +++ b/MobileGL/MG_State/GLState/TextureState/TextureObject.h @@ -214,7 +214,7 @@ namespace MobileGL { void SetMipmapImpl(const MipmapLevelInput& level) override; }; - // TODO: Add other texture types as needed + // TODO: add other texture types as needed } // namespace GLState } // namespace MG_State diff --git a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp index eb4d72ba..df7472cf 100644 --- a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp +++ b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp @@ -25,13 +25,13 @@ namespace MobileGL { m_attributes[index].Enabled = false; } - bool VertexArrayObject::IsAttributeEnabled(Uint index) const { + Bool VertexArrayObject::IsAttributeEnabled(Uint index) const { if (index >= MAX_VERTEX_ATTRIBS) return false; return m_attributes[index].Enabled; } - void VertexArrayObject::SetAttributeFormat(Uint index, int size, DataType type, bool normalized, int stride, - SizeT offset, bool isInteger) { + void VertexArrayObject::SetAttributeFormat(Uint index, int size, DataType type, Bool normalized, int stride, + SizeT offset, Bool isInteger) { if (index >= MAX_VERTEX_ATTRIBS) return; if (size < 1 || size > 4) { diff --git a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h index fde415c0..95b0b089 100644 --- a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h +++ b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h @@ -6,13 +6,13 @@ namespace MobileGL { namespace MG_State { namespace GLState { struct VertexAttribute { - bool Enabled = false; + Bool Enabled = false; int Size = 4; DataType Type = DataType::Float32; - bool Normalized = false; + Bool Normalized = false; int Stride = 0; SizeT Offset = 0; - bool IsInteger = false; + Bool IsInteger = false; SharedPtr Buffer; }; @@ -24,10 +24,10 @@ namespace MobileGL { void EnableAttribute(Uint index); void DisableAttribute(Uint index); - bool IsAttributeEnabled(Uint index) const; + Bool IsAttributeEnabled(Uint index) const; - void SetAttributeFormat(Uint index, int size, DataType type, bool normalized, int stride, SizeT offset, - bool isInteger); + void SetAttributeFormat(Uint index, int size, DataType type, Bool normalized, int stride, SizeT offset, + Bool isInteger); void BindAttributeBuffer(Uint index, const SharedPtr& buffer); diff --git a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.cpp b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.cpp index 1fbb593c..bed9084a 100644 --- a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.cpp +++ b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.cpp @@ -54,11 +54,11 @@ namespace MobileGL { // FIXME: report GL error here? } - bool VertexArrayState::ValidateName(Uint index) const { + Bool VertexArrayState::ValidateName(Uint index) const { return m_indexGenerator.IsValid(index); } - bool VertexArrayState::ValidateVertexArrayObject(Uint index) const { + Bool VertexArrayState::ValidateVertexArrayObject(Uint index) const { return index < m_vertexArrays.size() && m_vertexArrays[index] != nullptr; } diff --git a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.h b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.h index 9584c68b..d77468e5 100644 --- a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.h +++ b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayState.h @@ -15,8 +15,8 @@ namespace MobileGL { void Bind(Uint index); SharedPtr CreateVertexArrayObject(Uint index); void MarkVertexArrayForDeletion(Uint index); - bool ValidateName(Uint index) const; - bool ValidateVertexArrayObject(Uint index) const; + Bool ValidateName(Uint index) const; + Bool ValidateVertexArrayObject(Uint index) const; SharedPtr GetBoundVertexArray(); Vector>& GetAllVertexArrays(); diff --git a/MobileGL/MG_Util/Math/VectorTypes.h b/MobileGL/MG_Util/Math/VectorTypes.h index 2af329b8..9ba894d8 100644 --- a/MobileGL/MG_Util/Math/VectorTypes.h +++ b/MobileGL/MG_Util/Math/VectorTypes.h @@ -29,8 +29,8 @@ namespace MobileGL { return data[index]; } - bool operator==(const VecBase& rhs) const { return data == rhs.data; } - bool operator!=(const VecBase& rhs) const { return !(*this == rhs); } + Bool operator==(const VecBase& rhs) const { return data == rhs.data; } + Bool operator!=(const VecBase& rhs) const { return !(*this == rhs); } Derived operator+(const VecBase& rhs) const { Derived result; diff --git a/MobileGL/MG_Util/Miscellany/IndexGenerator.h b/MobileGL/MG_Util/Miscellany/IndexGenerator.h index 0e7fddfa..5a6b4032 100644 --- a/MobileGL/MG_Util/Miscellany/IndexGenerator.h +++ b/MobileGL/MG_Util/Miscellany/IndexGenerator.h @@ -46,7 +46,7 @@ namespace MobileGL { } } - bool IsValid(IndexType index) const { + Bool IsValid(IndexType index) const { SizeT word = index >> 6; SizeT bit = index & 0x3F; return word < is_valid_.size() && (is_valid_[word] & (1ull << bit)); @@ -56,7 +56,7 @@ namespace MobileGL { SizeT ActiveCount() const { return next_index_ - freed_indices_.size(); } private: - inline void SetValid(IndexType index, bool valid) { + inline void SetValid(IndexType index, Bool valid) { SizeT word = index >> 6; uint64_t mask = 1ull << (index & 0x3F); diff --git a/MobileGL/MG_Util/ShaderTranspiler/Types.h b/MobileGL/MG_Util/ShaderTranspiler/Types.h index 98258eff..90761a66 100644 --- a/MobileGL/MG_Util/ShaderTranspiler/Types.h +++ b/MobileGL/MG_Util/ShaderTranspiler/Types.h @@ -35,9 +35,9 @@ namespace MobileGL { std::string name; uint32_t location; - bool operator<(const InterfaceVariable& other) const { return location < other.location; } + Bool operator<(const InterfaceVariable& other) const { return location < other.location; } - bool operator==(const InterfaceVariable& other) const { + Bool operator==(const InterfaceVariable& other) const { return location == other.location && name == other.name; } }; diff --git a/MobileGL/MG_Util/Types.h b/MobileGL/MG_Util/Types.h index 94dbf9df..bc438640 100644 --- a/MobileGL/MG_Util/Types.h +++ b/MobileGL/MG_Util/Types.h @@ -22,7 +22,7 @@ namespace MobileGL { using Uint = Uint32; using Int64 = int64_t; using Uint64 = uint64_t; - using Bool = bool; + using Bool = Bool; using Float = float; using Double = double; using StringView = std::string_view; @@ -46,7 +46,7 @@ namespace MobileGL { template using Array = std::array; template - using UnorderedMap = std::unordered_map; + using UnorderedMap = ankerl::unordered_dense::map; template inline constexpr std::remove_reference_t&& Move(T&& t) noexcept { return static_cast&&>(t); @@ -196,9 +196,9 @@ namespace MobileGL { return *this; } - bool operator==(const Bit b) const { return flags == static_cast(b); } + Bool operator==(const Bit b) const { return flags == static_cast(b); } - bool operator!=(const Bit b) const { return !(*this == b); } + Bool operator!=(const Bit b) const { return !(*this == b); } // Flags - Flags Flags operator|(const Flags b) const { return Flags(flags | b.flags); } @@ -215,14 +215,14 @@ namespace MobileGL { return *this; } - bool operator==(const Flags b) const { return flags == b.flags; } + Bool operator==(const Flags b) const { return flags == b.flags; } - bool operator!=(const Flags b) const { return !(*this == b); } + Bool operator!=(const Flags b) const { return !(*this == b); } - operator bool() const { return Any(); } + operator Bool() const { return Any(); } private: - bool Any() const { return static_cast(flags) != 0; } + Bool Any() const { return static_cast(flags) != 0; } typename Underlying::type flags = 0; };