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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-20 07:48:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-20 07:48:32 +0400
commitbfcd1afe9c810621eef534832973dcd06010b388 (patch)
tree1b65222594e3892551b7f8c41ce99e3e925b8444 /source
parentb163e19b8df818becbd97c57a55c5a4e0e900da1 (diff)
compile fix: linux BLI_gzopen declare was conflicting.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/deform.c19
-rw-r--r--source/blender/blenlib/BLI_fileops.h6
-rw-r--r--source/blender/blenlib/intern/fileops.c8
3 files changed, 18 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 37c551a05b7..97780a30a5c 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -262,23 +262,24 @@ void defvert_flip(MDeformVert *dvert, const int *flip_map, const int flip_map_le
void defvert_flip_merged(MDeformVert *dvert, const int *flip_map, const int flip_map_len)
{
- MDeformWeight *dw, *copydw;
+ MDeformWeight *dw, *dw_cpy;
float weight;
int i, totweight = dvert->totweight;
/* copy weights */
- for (dw= dvert->dw, i=0; i<totweight; dw++, i++) {
+ for (dw = dvert->dw, i=0; i < totweight; dw++, i++) {
if (dw->def_nr < flip_map_len) {
if (flip_map[dw->def_nr] >= 0) {
- copydw= defvert_verify_index(dvert, flip_map[dw->def_nr]);
- dw= &dvert->dw[i]; /* in case array got realloced */
+ /* error checkers complain of this but we'll never get NULL return */
+ dw_cpy = defvert_verify_index(dvert, flip_map[dw->def_nr]);
+ dw = &dvert->dw[i]; /* in case array got realloced */
/* distribute weights: if only one of the vertex groups was
- assigned this will halve the weights, otherwise it gets
- evened out. this keeps it proportional to other groups */
- weight = 0.5f*(copydw->weight + dw->weight);
- copydw->weight= weight;
- dw->weight= weight;
+ * assigned this will halve the weights, otherwise it gets
+ * evened out. this keeps it proportional to other groups */
+ weight = 0.5f * (dw_cpy->weight + dw->weight);
+ dw_cpy->weight = weight;
+ dw->weight = weight;
}
}
}
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index fa1a61998d7..73220cbd739 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -45,6 +45,8 @@ extern "C" {
/* for size_t (needed on windows) */
#include <stddef.h>
+struct gzFile;
+
/* Common */
int BLI_exists(const char *path);
@@ -68,8 +70,8 @@ unsigned int BLI_dir_contents(const char *dir, struct direntry **filelist);
/* Files */
-FILE * BLI_fopen(const char * filename, const char * mode);
-void* BLI_gzopen(const char * filename, const char * mode);
+FILE *BLI_fopen(const char *filename, const char *mode);
+void *BLI_gzopen(const char *filename, const char *mode);
int BLI_open(const char *filename, int oflag, int pmode);
int BLI_file_is_writable(const char *file);
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 9527ec9466b..9c53048dc5b 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -202,12 +202,12 @@ int BLI_file_touch(const char *file)
static char str[MAXPATHLEN+12];
-FILE * BLI_fopen(const char * filename, const char * mode)
+FILE *BLI_fopen(const char *filename, const char *mode)
{
return ufopen(filename, mode);
}
-gzFile BLI_gzopen(const char * filename, const char * mode)
+gzFile BLI_gzopen(const char *filename, const char *mode)
{
gzFile gzfile;
int fi;
@@ -550,12 +550,12 @@ static int delete_single_file(const char *from, const char *UNUSED(to))
return recursiveOp_Callback_OK;
}
-FILE * BLI_fopen(const char * filename, const char * mode)
+FILE *BLI_fopen(const char *filename, const char *mode)
{
return fopen(filename, mode);
}
-gzFile BLI_gzopen(const char * filename, const char * mode)
+void *BLI_gzopen(const char *filename, const char *mode)
{
return gzopen(filename, mode);
}