Cleanup: use const arguments
This commit is contained in:
@@ -938,9 +938,9 @@ GPUPass *GPU_generate_pass(GPUMaterial *material,
|
||||
return pass;
|
||||
}
|
||||
|
||||
static int count_active_texture_sampler(GPUShader *shader, char *source)
|
||||
static int count_active_texture_sampler(GPUShader *shader, const char *source)
|
||||
{
|
||||
char *code = source;
|
||||
const char *code = source;
|
||||
|
||||
/* Remember this is per stage. */
|
||||
GSet *sampler_ids = BLI_gset_int_new(__func__);
|
||||
|
||||
@@ -684,7 +684,7 @@ static GPUMaterialLibrary *gpu_material_libraries[] = {
|
||||
|
||||
static GHash *FUNCTION_HASH = NULL;
|
||||
|
||||
char *gpu_str_skip_token(char *str, char *token, int max)
|
||||
const char *gpu_str_skip_token(const char *str, char *token, int max)
|
||||
{
|
||||
int len = 0;
|
||||
|
||||
@@ -752,7 +752,7 @@ static void gpu_parse_material_library(GHash *hash, GPUMaterialLibrary *library)
|
||||
eGPUType type;
|
||||
GPUFunctionQual qual;
|
||||
int i;
|
||||
char *code = library->code;
|
||||
const char *code = library->code;
|
||||
|
||||
while ((code = strstr(code, "void "))) {
|
||||
function = MEM_callocN(sizeof(GPUFunction), "GPUFunction");
|
||||
|
||||
@@ -62,5 +62,5 @@ char *gpu_material_library_generate_code(struct GSet *used_libraries, const char
|
||||
|
||||
/* Code Parsing */
|
||||
|
||||
char *gpu_str_skip_token(char *str, char *token, int max);
|
||||
const char *gpu_str_skip_token(const char *str, char *token, int max);
|
||||
const char *gpu_data_type_to_string(const eGPUType type);
|
||||
|
||||
Reference in New Issue
Block a user