RNA compile error and warning fixes for MSVC.
This commit is contained in:
@@ -510,7 +510,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *strct, FILE *f)
|
||||
}
|
||||
case PROP_BOOLEAN: {
|
||||
BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if(bprop->defaultarray) {
|
||||
fprintf(f, "static int rna_%s_%s_default[%d] = {", strct->cname, prop->cname, prop->arraylength);
|
||||
@@ -527,7 +527,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *strct, FILE *f)
|
||||
}
|
||||
case PROP_INT: {
|
||||
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if(iprop->defaultarray) {
|
||||
fprintf(f, "static int rna_%s_%s_default[%d] = {", strct->cname, prop->cname, prop->arraylength);
|
||||
@@ -544,7 +544,7 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *strct, FILE *f)
|
||||
}
|
||||
case PROP_FLOAT: {
|
||||
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if(fprop->defaultarray) {
|
||||
fprintf(f, "static float rna_%s_%s_default[%d] = {", strct->cname, prop->cname, prop->arraylength);
|
||||
|
@@ -383,7 +383,7 @@ void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int i
|
||||
|
||||
internal= MEM_callocN(sizeof(ArrayIterator), "ArrayIterator");
|
||||
internal->ptr= ptr;
|
||||
internal->endptr= ptr+length*itemsize;
|
||||
internal->endptr= ((char*)ptr)+length*itemsize;
|
||||
|
||||
iter->internal= internal;
|
||||
iter->valid= (internal->ptr != internal->endptr);
|
||||
|
@@ -272,11 +272,11 @@ PropertyRNA *RNA_def_property(StructRNA *strct, const char *cname, int type, int
|
||||
fprop= MEM_callocN(sizeof(FloatPropertyRNA), "FloatPropertyRNA");
|
||||
prop= &fprop->property;
|
||||
|
||||
fprop->hardmin= (subtype == PROP_UNSIGNED)? 0: -FLT_MAX;
|
||||
fprop->hardmin= (subtype == PROP_UNSIGNED)? 0.0f: -FLT_MAX;
|
||||
fprop->hardmax= FLT_MAX;
|
||||
|
||||
fprop->softmin= (subtype == PROP_UNSIGNED)? 0: -10000; /* rather arbitrary .. */
|
||||
fprop->softmax= 10000;
|
||||
fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
|
||||
fprop->softmax= 10000.0f;
|
||||
break;
|
||||
}
|
||||
case PROP_STRING: {
|
||||
@@ -421,16 +421,16 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
|
||||
IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
|
||||
iprop->hardmin= (int)min;
|
||||
iprop->hardmax= (int)max;
|
||||
iprop->softmin= MAX2(min, iprop->hardmin);
|
||||
iprop->softmax= MIN2(max, iprop->hardmax);
|
||||
iprop->softmin= MAX2((int)min, iprop->hardmin);
|
||||
iprop->softmax= MIN2((int)max, iprop->hardmax);
|
||||
break;
|
||||
}
|
||||
case PROP_FLOAT: {
|
||||
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
|
||||
fprop->hardmin= (float)min;
|
||||
fprop->hardmax= (float)max;
|
||||
fprop->softmin= MAX2(min, fprop->hardmin);
|
||||
fprop->softmax= MIN2(max, fprop->hardmax);
|
||||
fprop->softmin= MAX2((float)min, fprop->hardmin);
|
||||
fprop->softmax= MIN2((float)max, fprop->hardmax);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user