warning cleanup, also made voxel.c and volumetric.c use BM_INLINE define rather then having their own ifdefs in each file.
This commit is contained in:
@@ -264,7 +264,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui
|
||||
char tempname[FILE_MAXDIR + FILE_MAXFILE];
|
||||
/* void *data; */
|
||||
|
||||
if (guimode); //XXX waitcursor(1);
|
||||
if (guimode) {} //XXX waitcursor(1);
|
||||
|
||||
strcpy(name, filename);
|
||||
BLI_path_abs(name, G.sce);
|
||||
@@ -308,7 +308,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui
|
||||
}
|
||||
}
|
||||
|
||||
if(guimode); //XXX waitcursor(0);
|
||||
if(guimode) {} //XXX waitcursor(0);
|
||||
|
||||
return (ret_value);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "RNA_access.h"
|
||||
|
||||
/* **** XXX **** */
|
||||
static void error() {}
|
||||
static void error(const char *error, ...) {}
|
||||
|
||||
#define INT 96
|
||||
#define FLO 128
|
||||
|
||||
@@ -30,12 +30,7 @@
|
||||
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
|
||||
#if defined( _MSC_VER ) && !defined( __cplusplus )
|
||||
# define inline __inline
|
||||
#endif // defined( _MSC_VER ) && !defined( __cplusplus )
|
||||
|
||||
static inline float D(float *data, int *res, int x, int y, int z)
|
||||
BM_INLINE float D(float *data, int *res, int x, int y, int z)
|
||||
{
|
||||
CLAMP(x, 0, res[0]-1);
|
||||
CLAMP(y, 0, res[1]-1);
|
||||
@@ -57,7 +52,7 @@ float voxel_sample_nearest(float *data, int *res, float *co)
|
||||
}
|
||||
|
||||
// returns highest integer <= x as integer (slightly faster than floor())
|
||||
inline int FLOORI(float x)
|
||||
BM_INLINE int FLOORI(float x)
|
||||
{
|
||||
const int r = (int)x;
|
||||
return ((x >= 0.f) || (float)r == x) ? r : (r - 1);
|
||||
@@ -65,7 +60,7 @@ inline int FLOORI(float x)
|
||||
|
||||
// clamp function, cannot use the CLAMPIS macro, it sometimes returns unwanted results apparently related to gcc optimization flag -fstrict-overflow which is enabled at -O2
|
||||
// this causes the test (x + 2) < 0 with int x == 2147483647 to return false (x being an integer, x + 2 should wrap around to -2147483647 so the test < 0 should return true, which it doesn't)
|
||||
inline int _clamp(int a, int b, int c)
|
||||
BM_INLINE int _clamp(int a, int b, int c)
|
||||
{
|
||||
return (a < b) ? b : ((a > c) ? c : a);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
#endif
|
||||
|
||||
/* ************* XXX *************** */
|
||||
static int okee() {return 0;}
|
||||
static int okee(const char *dummy) {return 0;}
|
||||
static void BIF_undo_push(const char *msg) {}
|
||||
/* ************* XXX *************** */
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
/* ************* XXX *************** */
|
||||
static void waitcursor(int val) {}
|
||||
static void progress_bar() {}
|
||||
static void progress_bar(int dummy_val, const char *dummy) {}
|
||||
static void start_progress_bar() {}
|
||||
static void end_progress_bar() {}
|
||||
static void error(char *str) { printf("error: %s\n", str); }
|
||||
|
||||
@@ -78,9 +78,9 @@
|
||||
#include "armature_intern.h"
|
||||
|
||||
/* ************* XXX *************** */
|
||||
static int pupmenu() {return 0;}
|
||||
static void error() {};
|
||||
static void BIF_undo_push() {}
|
||||
static int pupmenu(const char *dummy) {return 0;}
|
||||
static void error(const char *dummy) {};
|
||||
static void BIF_undo_push(const char *dummy) {}
|
||||
/* ************* XXX *************** */
|
||||
|
||||
/* This function is used to indicate that a bone is selected and needs keyframes inserted */
|
||||
|
||||
@@ -962,7 +962,7 @@ static void ui_but_drop(bContext *C, wmEvent *event, uiBut *but, uiHandleButtonD
|
||||
if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
|
||||
ID *id= (ID *)wmd->poin;
|
||||
|
||||
if(but->poin==NULL && but->rnapoin.data==NULL);
|
||||
if(but->poin==NULL && but->rnapoin.data==NULL) {}
|
||||
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
|
||||
BLI_strncpy(data->str, id->name+2, data->maxlen);
|
||||
button_activate_state(C, but, BUTTON_STATE_EXIT);
|
||||
|
||||
@@ -572,8 +572,7 @@ static void init_iconfile_list(struct ListBase *list)
|
||||
if(!BLI_getwdN(olddir))
|
||||
restoredir = 0;
|
||||
totfile = BLI_getdir(icondirstr, &dir);
|
||||
if (restoredir && !chdir(olddir))
|
||||
; /* fix warning about checking return value */
|
||||
if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */
|
||||
|
||||
for(i=0; i<totfile; i++) {
|
||||
if( (dir[i].type & S_IFREG) ) {
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
#include "mesh_intern.h"
|
||||
|
||||
/* ***************** XXX **************** */
|
||||
static int pupmenu() {return 0;}
|
||||
static int pupmenu(const char *dummy) {return 0;}
|
||||
/* ***************** XXX **************** */
|
||||
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ editmesh.c:
|
||||
*/
|
||||
|
||||
/* XXX */
|
||||
static void BIF_undo_push() {}
|
||||
static void error() {}
|
||||
static void BIF_undo_push(const char *dummy) {}
|
||||
static void error(const char *dummy) {}
|
||||
|
||||
|
||||
/* ***************** HASH ********************* */
|
||||
|
||||
@@ -75,9 +75,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
|
||||
#include "mesh_intern.h"
|
||||
|
||||
/* **** XXX ******** */
|
||||
static void BIF_undo_push() {}
|
||||
static void BIF_undo_push(const char *dummy) {}
|
||||
static void BIF_undo() {}
|
||||
static void error() {}
|
||||
static void error(const char *dummy) {}
|
||||
static int qtest() {return 0;}
|
||||
/* **** XXX ******** */
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ editmesh_mods.c, UI level access, no geometry changes
|
||||
|
||||
/* XXX */
|
||||
static void waitcursor(int val) {}
|
||||
static int pupmenu() {return 0;}
|
||||
static int pupmenu(const char *dummy) {return 0;}
|
||||
|
||||
/* ****************************** MIRROR **************** */
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
#include "mesh_intern.h"
|
||||
|
||||
/* XXX */
|
||||
static int pupmenu() {return 0;}
|
||||
static int pupmenu(const char *dummy) {return 0;}
|
||||
/* XXX */
|
||||
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
#include "object_intern.h" // own include
|
||||
|
||||
/* ************* XXX **************** */
|
||||
static void error() {}
|
||||
static void error(const char *dummy) {}
|
||||
static void waitcursor(int val) {}
|
||||
static int pupmenu(const char *msg) {return 0;}
|
||||
|
||||
|
||||
@@ -279,8 +279,9 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
if(stroke->stroke_started) {
|
||||
if(paint_smooth_stroke(stroke, mouse, event)) {
|
||||
if(paint_space_stroke_enabled(stroke->brush)) {
|
||||
if(!paint_space_stroke(C, op, event, mouse))
|
||||
;//ED_region_tag_redraw(ar);
|
||||
if(!paint_space_stroke(C, op, event, mouse)) {
|
||||
//ED_region_tag_redraw(ar);
|
||||
}
|
||||
}
|
||||
else
|
||||
paint_brush_stroke_add_step(C, op, event, mouse);
|
||||
|
||||
@@ -739,7 +739,7 @@ static void filelist_read_dir(struct FileList* filelist)
|
||||
BLI_cleanup_dir(G.sce, filelist->dir);
|
||||
filelist->numfiles = BLI_getdir(filelist->dir, &(filelist->filelist));
|
||||
|
||||
if(!chdir(wdir)) /* fix warning about not checking return value */;
|
||||
if(!chdir(wdir)) {} /* fix warning about not checking return value */
|
||||
filelist_setfiletypes(filelist, G.have_quicktime);
|
||||
filelist_filter(filelist);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
#include "file_intern.h"
|
||||
|
||||
/* XXX */
|
||||
static void error() {}
|
||||
static void error(const char *dummy) {}
|
||||
static void waitcursor(int val) {}
|
||||
static void activate_fileselect() {}
|
||||
static int saveover() {return 0;}
|
||||
static void activate_fileselect(int d1, char *d2, char *d3, void *d4) {}
|
||||
static int saveover(const char *dummy) {return 0;}
|
||||
/* XXX */
|
||||
|
||||
|
||||
|
||||
@@ -101,11 +101,6 @@
|
||||
#define B_SIMACLONEBROWSE 25
|
||||
#define B_SIMACLONEDELETE 26
|
||||
|
||||
/* XXX */
|
||||
static int simaFaceDraw_Check() {return 0;}
|
||||
static int simaUVSel_Check() {return 0;}
|
||||
/* XXX */
|
||||
|
||||
/* proto */
|
||||
static void image_editvertex_buts(const bContext *C, uiBlock *block);
|
||||
|
||||
@@ -203,7 +198,9 @@ static void image_transform_but_attr(SpaceImage *sima, int *imx, int *imy, int *
|
||||
/* is used for both read and write... */
|
||||
static void image_editvertex_buts(const bContext *C, uiBlock *block)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
SpaceImage *sima= CTX_wm_space_image(C);
|
||||
Image *ima= sima->image;
|
||||
Object *obedit= CTX_data_edit_object(C);
|
||||
static float ocent[2];
|
||||
float cent[2]= {0.0, 0.0};
|
||||
@@ -218,24 +215,24 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
|
||||
em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
|
||||
for (efa= em->faces.first; efa; efa= efa->next) {
|
||||
tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
|
||||
if (simaFaceDraw_Check(efa, tf)) {
|
||||
if (uvedit_face_visible(scene, ima, efa, tf)) {
|
||||
|
||||
if (simaUVSel_Check(efa, tf, 0)) {
|
||||
if (uvedit_uv_selected(scene, efa, tf, 0)) {
|
||||
cent[0]+= tf->uv[0][0];
|
||||
cent[1]+= tf->uv[0][1];
|
||||
nactive++;
|
||||
}
|
||||
if (simaUVSel_Check(efa, tf, 1)) {
|
||||
if (uvedit_uv_selected(scene, efa, tf, 1)) {
|
||||
cent[0]+= tf->uv[1][0];
|
||||
cent[1]+= tf->uv[1][1];
|
||||
nactive++;
|
||||
}
|
||||
if (simaUVSel_Check(efa, tf, 2)) {
|
||||
if (uvedit_uv_selected(scene, efa, tf, 2)) {
|
||||
cent[0]+= tf->uv[2][0];
|
||||
cent[1]+= tf->uv[2][1];
|
||||
nactive++;
|
||||
}
|
||||
if (efa->v4 && simaUVSel_Check(efa, tf, 3)) {
|
||||
if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) {
|
||||
cent[0]+= tf->uv[3][0];
|
||||
cent[1]+= tf->uv[3][1];
|
||||
nactive++;
|
||||
@@ -282,20 +279,20 @@ static void image_editvertex_buts(const bContext *C, uiBlock *block)
|
||||
|
||||
for (efa= em->faces.first; efa; efa= efa->next) {
|
||||
tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
|
||||
if (simaFaceDraw_Check(efa, tf)) {
|
||||
if (simaUVSel_Check(efa, tf, 0)) {
|
||||
if (uvedit_face_visible(scene, ima, efa, tf)) {
|
||||
if (uvedit_uv_selected(scene, efa, tf, 0)) {
|
||||
tf->uv[0][0]+= delta[0];
|
||||
tf->uv[0][1]+= delta[1];
|
||||
}
|
||||
if (simaUVSel_Check(efa, tf, 1)) {
|
||||
if (uvedit_uv_selected(scene, efa, tf, 1)) {
|
||||
tf->uv[1][0]+= delta[0];
|
||||
tf->uv[1][1]+= delta[1];
|
||||
}
|
||||
if (simaUVSel_Check(efa, tf, 2)) {
|
||||
if (uvedit_uv_selected(scene, efa, tf, 2)) {
|
||||
tf->uv[2][0]+= delta[0];
|
||||
tf->uv[2][1]+= delta[1];
|
||||
}
|
||||
if (efa->v4 && simaUVSel_Check(efa, tf, 3)) {
|
||||
if (efa->v4 && uvedit_uv_selected(scene, efa, tf, 3)) {
|
||||
tf->uv[3][0]+= delta[0];
|
||||
tf->uv[3][1]+= delta[1];
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
/* ************* XXX **************** */
|
||||
|
||||
static void error() {}
|
||||
static void error(const char *dummy, ...) {}
|
||||
|
||||
/* ********************************** */
|
||||
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
//static Sequence *_last_seq=0;
|
||||
//static int _last_seq_init=0;
|
||||
/* XXX */
|
||||
static void error() {}
|
||||
static void error(const char *dummy) {}
|
||||
static void waitcursor(int val) {}
|
||||
static void activate_fileselect() {}
|
||||
static int pupmenu() {return 0;}
|
||||
static int okee() {return 0;}
|
||||
static void activate_fileselect(int d1, char *d2, char *d3, void *d4) {}
|
||||
static int pupmenu(const char *dummy) {return 0;}
|
||||
static int okee(const char *dummy) {return 0;}
|
||||
|
||||
|
||||
/* XXX */
|
||||
|
||||
@@ -64,8 +64,7 @@
|
||||
|
||||
/* own include */
|
||||
#include "sequencer_intern.h"
|
||||
static void *find_nearest_marker() {return NULL;}
|
||||
static void deselect_markers() {}
|
||||
static void *find_nearest_marker(int d1, int d2) {return NULL;}
|
||||
|
||||
void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */
|
||||
{
|
||||
@@ -349,7 +348,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
marker->flag |= SELECT;
|
||||
}
|
||||
else {
|
||||
deselect_markers(0, 0);
|
||||
/* deselect_markers(0, 0); */ /* XXX, in 2.4x, seq selection used to deselect all, need to re-thnik this for 2.5 */
|
||||
marker->flag |= SELECT;
|
||||
}
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ static void do_lasso_select_mesh_uv(short mcords[][2], short moves, short select
|
||||
} else { /* Vert Sel*/
|
||||
for (efa= em->faces.first; efa; efa= efa->next) {
|
||||
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
|
||||
if (simaFaceDraw_Check(efa, tf)) {
|
||||
if (uvedit_face_visible(scene, ima, efa, tf)) {
|
||||
nverts= efa->v4? 4: 3;
|
||||
for(i=0; i<nverts; i++) {
|
||||
if ((select) != (simaUVSel_Check(efa, tf, i))) {
|
||||
|
||||
@@ -76,7 +76,7 @@ void undo_editmode_menu(void) // history menu
|
||||
/* ********************************************************************* */
|
||||
|
||||
/* ****** XXX ***** */
|
||||
void error() {}
|
||||
void error(const char *dummy) {}
|
||||
/* ****** XXX ***** */
|
||||
|
||||
|
||||
|
||||
@@ -1515,8 +1515,9 @@ void GPU_buffer_unbind()
|
||||
else
|
||||
break;
|
||||
}
|
||||
if( GLStates != 0 )
|
||||
if( GLStates != 0 ) {
|
||||
DEBUG_VBO( "Some weird OpenGL state is still set. Why?" );
|
||||
}
|
||||
if( useVBOs )
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
/* ****************************************** */
|
||||
/* Drivers - PyExpression Evaluation */
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
@@ -32,8 +34,6 @@
|
||||
#include "BKE_fcurve.h"
|
||||
#include "BKE_global.h"
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
/* for pydrivers (drivers using one-line Python expressions to express relationships between targets) */
|
||||
PyObject *bpy_pydriver_Dict = NULL;
|
||||
|
||||
|
||||
@@ -56,10 +56,6 @@
|
||||
#include "volumetric.h"
|
||||
#include "volume_precache.h"
|
||||
|
||||
#if defined( _MSC_VER ) && !defined( __cplusplus )
|
||||
# define inline __inline
|
||||
#endif // defined( _MSC_VER ) && !defined( __cplusplus )
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
|
||||
/* only to be used here in this file, it's for speed */
|
||||
@@ -67,7 +63,7 @@ extern struct Render R;
|
||||
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
/* luminance rec. 709 */
|
||||
inline float luminance(float* col)
|
||||
BM_INLINE float luminance(float* col)
|
||||
{
|
||||
return (0.212671f*col[0] + 0.71516f*col[1] + 0.072169f*col[2]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user