Merge pull request #42 from ccawley2011/rwstrdup

Replace use of strdup with rwstrdup
This commit is contained in:
aap
2021-01-14 00:34:13 +01:00
committed by GitHub
5 changed files with 18 additions and 21 deletions

View File

@@ -33,7 +33,7 @@ registerUniform(const char *name)
assert(0 && "no space for uniform");
return -1;
}
uniformRegistry.uniformNames[uniformRegistry.numUniforms] = strdup(name);
uniformRegistry.uniformNames[uniformRegistry.numUniforms] = rwStrdup(name, MEMDUR_EVENT);
return uniformRegistry.numUniforms++;
}
@@ -56,7 +56,7 @@ registerBlock(const char *name)
// TODO: print error
if(uniformRegistry.numBlocks+1 >= MAX_BLOCKS)
return -1;
uniformRegistry.blockNames[uniformRegistry.numBlocks] = strdup(name);
uniformRegistry.blockNames[uniformRegistry.numBlocks] = rwStrdup(name, MEMDUR_EVENT);
return uniformRegistry.numBlocks++;
}