[Bf-blender-cvs] [a7a74da] temp_imbuf_types_refactor: minor edits to imb refactor
Campbell Barton
noreply at git.blender.org
Mon Jul 13 13:43:12 CEST 2015
Commit: a7a74dacf752ed2c415bfcb009c7aae941a4f15d
Author: Campbell Barton
Date: Mon Jul 13 21:38:09 2015 +1000
Branches: temp_imbuf_types_refactor
https://developer.blender.org/rBa7a74dacf752ed2c415bfcb009c7aae941a4f15d
minor edits to imb refactor
prefer memset so adding new members doesn't cause uninitialized bugs.
===================================================================
M source/blender/blenkernel/intern/image.c
M source/blender/imbuf/IMB_imbuf_types.h
===================================================================
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 35cd81c..a906a6d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1210,7 +1210,7 @@ void BKE_image_all_free_anim_ibufs(int cfra)
int BKE_image_imtype_to_ftype(const char imtype, ImbFormatOptions *r_options)
{
- r_options->flag = r_options->quality = 0;
+ memset(r_options, 0, sizeof(*r_options));
if (imtype == R_IMF_IMTYPE_TARGA)
return IMB_FTYPE_TGA;
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index e47734d..4af6313 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -187,8 +187,8 @@ typedef struct ImBuf {
void *userdata; /* temporary storage */
/* file information */
- enum eImbTypes ftype; /* file type we are going to save as */
- ImbFormatOptions foptions; /* file format specific flags */
+ enum eImbTypes ftype; /* file type we are going to save as */
+ ImbFormatOptions foptions; /* file format specific flags */
char name[IB_FILENAME_SIZE]; /* filename associated with this image */
char cachename[IB_FILENAME_SIZE]; /* full filename used for reading from cache */
More information about the Bf-blender-cvs
mailing list