Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-01 03:23:08 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-01 03:23:08 +0300
commit21a0e55c501d9bb02d98ef4987eb83371d1f0ecf (patch)
treeb15b352ec44ec6370c79061362d00eb6e5e630d2
parent7f24dbe5fc5a00ee161717070deb6baf4af8e83e (diff)
RNA compile error and warning fixes for MSVC.
-rw-r--r--source/blender/makesrna/intern/makesrna.c6
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_define.c14
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 2ac287bfce2..d432510154d 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index af4a4b47cb3..724b8e2dbab 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index b3399df67ab..1db6ac6e43c 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -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: