From 48556e6c2b20ff654688b56f295e54eadadc1f64 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Mon, 7 Feb 2022 11:23:09 -0500 Subject: [PATCH] use new utilCStrMatch function instead of hashing --- src/shader.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/shader.cpp b/src/shader.cpp index c427da6..0f3e85e 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -143,11 +143,8 @@ getShaderByHash(GLContext* gl_ctx, u64 hash) ShaderProgram* getShaderByName(const char* name, GLContext* gl_ctx) { - // FIXME: no reason to use hashes here. should use std::strncmp instead - u64 hash = utilFNV64a_str(name); - for (u32 i = 0; i < gl_ctx->num_shaders; i++) { - if (utilFNV64a_str(gl_ctx->shaders[i].name) == hash) + if (utilCStrMatch(name, gl_ctx->shaders[i].name)) return &gl_ctx->shaders[i]; }