Fix some MSVC 2010 warnings (including one apparent bug in intern/elbeem/intern/solver_relax.h)
This commit is contained in:
@@ -390,7 +390,7 @@
|
||||
#define DEFAULT_STREAM \
|
||||
m[dC] = RAC(ccel,dC); \
|
||||
\
|
||||
if((!nbored & CFBnd)) { \
|
||||
if(!(nbored & CFBnd)) { \
|
||||
\
|
||||
m[dN ] = CSRC_N ; m[dS ] = CSRC_S ; \
|
||||
m[dE ] = CSRC_E ; m[dW ] = CSRC_W ; \
|
||||
|
@@ -132,7 +132,7 @@ protected:
|
||||
uint32 mixBits( const uint32& u, const uint32& v ) const
|
||||
{ return hiBit(u) | loBits(v); }
|
||||
uint32 twist( const uint32& m, const uint32& s0, const uint32& s1 ) const
|
||||
{ return m ^ (mixBits(s0,s1)>>1) ^ (-loBit(s1) & 0x9908b0dfUL); }
|
||||
{ return m ^ (mixBits(s0,s1)>>1) ^ ((~loBit(s1) + 1) & 0x9908b0dfUL); }
|
||||
static uint32 hash( time_t t, clock_t c );
|
||||
};
|
||||
|
||||
|
@@ -46,6 +46,7 @@
|
||||
|
||||
AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data) {
|
||||
int i;
|
||||
int useconds;
|
||||
|
||||
(void)stream; /* unused */
|
||||
|
||||
@@ -100,8 +101,9 @@ AviError AVI_set_compress_option (AviMovie *movie, int option_type, int stream,
|
||||
break;
|
||||
|
||||
case AVI_OPTION_FRAMERATE:
|
||||
if (1000000/(*((double *) opt_data)))
|
||||
movie->header->MicroSecPerFrame = 1000000/(*((double *) opt_data));
|
||||
useconds = (int)(1000000/(*((double *) opt_data)));
|
||||
if (useconds)
|
||||
movie->header->MicroSecPerFrame = useconds;
|
||||
|
||||
for (i=0; i < movie->header->Streams; i++) {
|
||||
if (avi_get_format_type(movie->streams[i].format) == FCC("vids")) {
|
||||
|
@@ -346,7 +346,7 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
|
||||
|
||||
if(!BLI_ghash_haskey(map, key)) {
|
||||
if(BLI_bitmap_get(bvh->vert_bitmap, vertex)) {
|
||||
value = SET_INT_IN_POINTER(-(*face_verts) - 1);
|
||||
value = SET_INT_IN_POINTER(~(*face_verts));
|
||||
++(*face_verts);
|
||||
}
|
||||
else {
|
||||
|
@@ -478,12 +478,12 @@ LinkNode *BLI_read_file_as_lines(const char *name)
|
||||
FILE *fp= fopen(name, "r");
|
||||
LinkNode *lines= NULL;
|
||||
char *buf;
|
||||
int64_t size;
|
||||
size_t size;
|
||||
|
||||
if (!fp) return NULL;
|
||||
|
||||
fseek(fp, 0, SEEK_END);
|
||||
size= ftell(fp);
|
||||
size= (size_t)ftell(fp);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
|
||||
buf= MEM_mallocN(size, "file_as_lines");
|
||||
|
@@ -12070,7 +12070,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
/* Adaptive time step for particle systems */
|
||||
ParticleSettings *part;
|
||||
for (part = main->particle.first; part; part = part->id.next) {
|
||||
part->courant_target = 0.2;
|
||||
part->courant_target = 0.2f;
|
||||
part->time_flag &= ~PART_TIME_AUTOSF;
|
||||
}
|
||||
}
|
||||
@@ -12089,7 +12089,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
if(sce->gm.recastData.cellheight == 0.0f)
|
||||
sce->gm.recastData.cellheight = 0.2f;
|
||||
if(sce->gm.recastData.agentmaxslope == 0.0f)
|
||||
sce->gm.recastData.agentmaxslope = M_PI/4;
|
||||
sce->gm.recastData.agentmaxslope = (float)M_PI/4;
|
||||
if(sce->gm.recastData.agentmaxclimb == 0.0f)
|
||||
sce->gm.recastData.agentmaxclimb = 0.9f;
|
||||
if(sce->gm.recastData.agentheight == 0.0f)
|
||||
|
@@ -50,8 +50,8 @@ typedef struct IconFile {
|
||||
#define ICON_DEFAULT_HEIGHT 16
|
||||
#define ICON_DEFAULT_WIDTH 16
|
||||
|
||||
#define ICON_DEFAULT_HEIGHT_SCALE (UI_UNIT_Y * 0.8f)
|
||||
#define ICON_DEFAULT_WIDTH_SCALE (UI_UNIT_X * 0.8f)
|
||||
#define ICON_DEFAULT_HEIGHT_SCALE ((int)(UI_UNIT_Y * 0.8f))
|
||||
#define ICON_DEFAULT_WIDTH_SCALE ((int)(UI_UNIT_X * 0.8f))
|
||||
|
||||
#define PREVIEW_DEFAULT_HEIGHT 96
|
||||
|
||||
|
@@ -138,7 +138,7 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar)
|
||||
wmKeyMap *keymap;
|
||||
ListBase *lb;
|
||||
|
||||
const int prev_y_min= ar->v2d.cur.ymin; /* so resizing keeps the cursor visible */
|
||||
const float prev_y_min= ar->v2d.cur.ymin; /* so resizing keeps the cursor visible */
|
||||
|
||||
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
|
||||
|
||||
|
@@ -520,7 +520,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
|
||||
|
||||
file_draw_preview(block, file, sx, sy, imb, layout, !is_icon && (file->flags & IMAGEFILE));
|
||||
} else {
|
||||
file_draw_icon(block, file->path, sx, sy-(UI_UNIT_Y / 6), get_file_icon(file), ICON_DEFAULT_WIDTH_SCALE, ICON_DEFAULT_WIDTH_SCALE);
|
||||
file_draw_icon(block, file->path, sx, sy-(UI_UNIT_Y / 6), get_file_icon(file), ICON_DEFAULT_WIDTH_SCALE, ICON_DEFAULT_HEIGHT_SCALE);
|
||||
sx += ICON_DEFAULT_WIDTH_SCALE + 4;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user