mirror of
https://github.com/aap/librw.git
synced 2025-12-20 01:19:51 +00:00
Merge pull request #42 from ccawley2011/rwstrdup
Replace use of strdup with rwstrdup
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user