forked from bartvdbraak/blender
Quiet warnings about unused functions and variables.
Commented or '#if 0' these functions/variables and marked with 'UNUSED' comment so they can be restored in the future if needed.
This commit is contained in:
parent
e6834fcf85
commit
ccbed13343
@ -265,8 +265,10 @@ BuildHeap(
|
|||||||
// load in edge pointers to the heap
|
// load in edge pointers to the heap
|
||||||
|
|
||||||
std::vector<LOD_Edge> & edge_set= m_mesh.EdgeSet();
|
std::vector<LOD_Edge> & edge_set= m_mesh.EdgeSet();
|
||||||
std::vector<LOD_Edge>::const_iterator edge_end = edge_set.end();
|
|
||||||
std::vector<LOD_Edge>::iterator edge_start = edge_set.begin();
|
// UNUSED
|
||||||
|
// std::vector<LOD_Edge>::const_iterator edge_end = edge_set.end();
|
||||||
|
// std::vector<LOD_Edge>::iterator edge_start = edge_set.begin();
|
||||||
|
|
||||||
std::vector<int> & heap_vector = m_heap->HeapVector();
|
std::vector<int> & heap_vector = m_heap->HeapVector();
|
||||||
|
|
||||||
|
@ -300,6 +300,9 @@ static BMVert *BME_bevel_split_edge(BMesh *bm, BMVert *v, BMVert *v1, BMLoop *l,
|
|||||||
float maxfactor, scale, len, dis, vec1[3], vec2[3], t_up_vec[3];
|
float maxfactor, scale, len, dis, vec1[3], vec2[3], t_up_vec[3];
|
||||||
int is_edge, forward, is_split_vert;
|
int is_edge, forward, is_split_vert;
|
||||||
|
|
||||||
|
/* ov, vtd2, and is_split_vert are set but UNUSED */
|
||||||
|
(void)ov, (void)vtd2, (void)is_split_vert;
|
||||||
|
|
||||||
if (l == NULL) {
|
if (l == NULL) {
|
||||||
/* what you call operator overloading in C :)
|
/* what you call operator overloading in C :)
|
||||||
* I wanted to use the same function for both wire edges and poly loops
|
* I wanted to use the same function for both wire edges and poly loops
|
||||||
@ -646,7 +649,7 @@ static BMLoop *BME_bevel_edge(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
|
|||||||
static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td)
|
static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(options), float *up_vec, BME_TransData_Head *td)
|
||||||
{
|
{
|
||||||
BMVert *v1, *v2;
|
BMVert *v1, *v2;
|
||||||
BMFace *f;
|
/* BMFace *f; */ /* UNUSED */
|
||||||
|
|
||||||
/* get/make the first vert to be used in SFME */
|
/* get/make the first vert to be used in SFME */
|
||||||
/* may need to split the previous edge */
|
/* may need to split the previous edge */
|
||||||
@ -659,7 +662,7 @@ static BMLoop *BME_bevel_vert(BMesh *bm, BMLoop *l, float value, int UNUSED(opti
|
|||||||
l = l->next->next;
|
l = l->next->next;
|
||||||
|
|
||||||
/* "cut off" this corner */
|
/* "cut off" this corner */
|
||||||
f = BM_face_split(bm, l->f, v2, v1, NULL, l->e, FALSE);
|
/* f = */ BM_face_split(bm, l->f, v2, v1, NULL, l->e, FALSE);
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,7 @@ void flipArcBuckets(ReebArc *arc);
|
|||||||
|
|
||||||
/***************************************** UTILS **********************************************/
|
/***************************************** UTILS **********************************************/
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static VertexData *allocVertexData(EditMesh *em)
|
static VertexData *allocVertexData(EditMesh *em)
|
||||||
{
|
{
|
||||||
VertexData *data;
|
VertexData *data;
|
||||||
@ -160,6 +161,8 @@ static void nodeSetData(EditVert *eve, ReebNode *n)
|
|||||||
((VertexData*)eve->tmp.p)->n = n;
|
((VertexData*)eve->tmp.p)->n = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
void REEB_freeArc(BArc *barc)
|
void REEB_freeArc(BArc *barc)
|
||||||
{
|
{
|
||||||
ReebArc *arc = (ReebArc*)barc;
|
ReebArc *arc = (ReebArc*)barc;
|
||||||
@ -232,6 +235,7 @@ void BIF_flagMultiArcs(ReebGraph *rg, int flag)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
|
static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
|
||||||
{
|
{
|
||||||
float weight;
|
float weight;
|
||||||
@ -300,6 +304,7 @@ static void relinkNodes(ReebGraph *low_rg, ReebGraph *high_rg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ReebNode *BIF_otherNodeFromIndex(ReebArc *arc, ReebNode *node)
|
ReebNode *BIF_otherNodeFromIndex(ReebArc *arc, ReebNode *node)
|
||||||
{
|
{
|
||||||
@ -321,6 +326,7 @@ ReebNode *BIF_lowestLevelNode(ReebNode *node)
|
|||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
|
static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
|
||||||
{
|
{
|
||||||
ReebArc *cp_arc;
|
ReebArc *cp_arc;
|
||||||
@ -395,6 +401,7 @@ static ReebGraph * copyReebGraph(ReebGraph *rg, int level)
|
|||||||
|
|
||||||
return cp_rg;
|
return cp_rg;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
|
ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
|
||||||
{
|
{
|
||||||
@ -408,6 +415,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node)
|
|||||||
return multi_rg;
|
return multi_rg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static ReebEdge * copyEdge(ReebEdge *edge)
|
static ReebEdge * copyEdge(ReebEdge *edge)
|
||||||
{
|
{
|
||||||
ReebEdge *newEdge = NULL;
|
ReebEdge *newEdge = NULL;
|
||||||
@ -954,6 +962,7 @@ static void calculateGraphLength(ReebGraph *rg)
|
|||||||
calculateArcLength(arc);
|
calculateArcLength(arc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**************************************** SYMMETRY HANDLING ******************************************/
|
/**************************************** SYMMETRY HANDLING ******************************************/
|
||||||
|
|
||||||
@ -1160,6 +1169,7 @@ void REEB_AxialSymmetry(BNode* root_node, BNode* node1, BNode* node2, struct BAr
|
|||||||
|
|
||||||
/****************************************** SMOOTHING **************************************************/
|
/****************************************** SMOOTHING **************************************************/
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
void postprocessGraph(ReebGraph *rg, char mode)
|
void postprocessGraph(ReebGraph *rg, char mode)
|
||||||
{
|
{
|
||||||
ReebArc *arc;
|
ReebArc *arc;
|
||||||
@ -3138,6 +3148,7 @@ int weightFromDistance(EditMesh *em, EdgeIndex *indexed_edges)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************** BUCKET ITERATOR **************************************************/
|
/****************************************** BUCKET ITERATOR **************************************************/
|
||||||
|
|
||||||
|
@ -2837,12 +2837,15 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType *
|
|||||||
|
|
||||||
return but;
|
return but;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static uiBut *UNUSED_FUNCTION(ui_def_but_operator)(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip)
|
static uiBut *UNUSED_FUNCTION(ui_def_but_operator)(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip)
|
||||||
{
|
{
|
||||||
wmOperatorType *ot = WM_operatortype_find(opname, 0);
|
wmOperatorType *ot = WM_operatortype_find(opname, 0);
|
||||||
if (str == NULL && ot == NULL) str = opname;
|
if (str == NULL && ot == NULL) str = opname;
|
||||||
return ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip);
|
return ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
|
static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
|
||||||
{
|
{
|
||||||
|
@ -4361,7 +4361,7 @@ static int createSlideVerts(TransInfo *t)
|
|||||||
BMEditMesh *em = me->edit_btmesh;
|
BMEditMesh *em = me->edit_btmesh;
|
||||||
BMesh *bm = em->bm;
|
BMesh *bm = em->bm;
|
||||||
BMIter iter, iter2;
|
BMIter iter, iter2;
|
||||||
BMEdge *e, *e1, *ee, *le;
|
BMEdge *e, *e1 /*, *ee, *le */ /* UNUSED */;
|
||||||
BMVert *v, *v2, *first;
|
BMVert *v, *v2, *first;
|
||||||
BMLoop *l, *l1, *l2;
|
BMLoop *l, *l1, *l2;
|
||||||
TransDataSlideVert *tempsv;
|
TransDataSlideVert *tempsv;
|
||||||
@ -4373,7 +4373,7 @@ static int createSlideVerts(TransInfo *t)
|
|||||||
ARegion *ar = t->ar;
|
ARegion *ar = t->ar;
|
||||||
float projectMat[4][4];
|
float projectMat[4][4];
|
||||||
float start[3] = {0.0f, 0.0f, 0.0f}, dir[3], end[3] = {0.0f, 0.0f, 0.0f};
|
float start[3] = {0.0f, 0.0f, 0.0f}, dir[3], end[3] = {0.0f, 0.0f, 0.0f};
|
||||||
float vec[3], vec2[3], lastvec[3], size, dis=0.0, z;
|
float vec[3], vec2[3], lastvec[3] /*, size, dis=0.0, z */ /* UNUSED */;
|
||||||
int numsel, i, j;
|
int numsel, i, j;
|
||||||
|
|
||||||
if (!v3d) {
|
if (!v3d) {
|
||||||
@ -4547,10 +4547,10 @@ static int createSlideVerts(TransInfo *t)
|
|||||||
sld->totsv = j;
|
sld->totsv = j;
|
||||||
|
|
||||||
/*find mouse vector*/
|
/*find mouse vector*/
|
||||||
dis = z = -1.0f;
|
/* dis = z = -1.0f; */ /* UNUSED */
|
||||||
size = 50.0;
|
/* size = 50.0; */ /* UNUSED */
|
||||||
zero_v3(lastvec); zero_v3(dir);
|
zero_v3(lastvec); zero_v3(dir);
|
||||||
ee = le = NULL;
|
/* ee = le = NULL; */ /* UNUSED */
|
||||||
BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
|
BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
|
||||||
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
|
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
|
||||||
BMIter iter2;
|
BMIter iter2;
|
||||||
@ -4588,8 +4588,8 @@ static int createSlideVerts(TransInfo *t)
|
|||||||
d = dist_to_line_segment_v2(mval, vec1, vec2);
|
d = dist_to_line_segment_v2(mval, vec1, vec2);
|
||||||
if (dis2 == -1.0f || d < dis2) {
|
if (dis2 == -1.0f || d < dis2) {
|
||||||
dis2 = d;
|
dis2 = d;
|
||||||
ee = e2;
|
/* ee = e2; */ /* UNUSED */
|
||||||
size = len_v3v3(vec1, vec2);
|
/* size = len_v3v3(vec1, vec2); */ /* UNUSED */
|
||||||
sub_v3_v3v3(dir, vec1, vec2);
|
sub_v3_v3v3(dir, vec1, vec2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4680,7 +4680,7 @@ void projectSVData(TransInfo *t, int final)
|
|||||||
BMIter liter2;
|
BMIter liter2;
|
||||||
BMFace *copyf, *copyf2;
|
BMFace *copyf, *copyf2;
|
||||||
BMLoop *l2;
|
BMLoop *l2;
|
||||||
int sel, hide, do_vdata;
|
int sel, hide /*, do_vdata */ /* UNUSED */;
|
||||||
|
|
||||||
if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
|
if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
|
||||||
continue;
|
continue;
|
||||||
@ -4698,12 +4698,12 @@ void projectSVData(TransInfo *t, int final)
|
|||||||
/*project onto copied projection face*/
|
/*project onto copied projection face*/
|
||||||
BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_FACE, f) {
|
BM_ITER(l2, &liter2, em->bm, BM_LOOPS_OF_FACE, f) {
|
||||||
copyf = copyf2;
|
copyf = copyf2;
|
||||||
do_vdata = l2->v==tempsv->v;
|
/* do_vdata = l2->v==tempsv->v; */ /* UNUSED */
|
||||||
|
|
||||||
if (BM_elem_flag_test(l2->e, BM_ELEM_SELECT) || BM_elem_flag_test(l2->prev->e, BM_ELEM_SELECT)) {
|
if (BM_elem_flag_test(l2->e, BM_ELEM_SELECT) || BM_elem_flag_test(l2->prev->e, BM_ELEM_SELECT)) {
|
||||||
BMLoop *l3 = l2;
|
BMLoop *l3 = l2;
|
||||||
|
|
||||||
do_vdata = 1;
|
/* do_vdata = 1; */ /* UNUSED */
|
||||||
|
|
||||||
if (!BM_elem_flag_test(l2->e, BM_ELEM_SELECT))
|
if (!BM_elem_flag_test(l2->e, BM_ELEM_SELECT))
|
||||||
l3 = l3->prev;
|
l3 = l3->prev;
|
||||||
|
@ -767,7 +767,7 @@ static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), i
|
|||||||
BMLoop *l;
|
BMLoop *l;
|
||||||
MLoopUV *luv;
|
MLoopUV *luv;
|
||||||
BMIter iter;
|
BMIter iter;
|
||||||
float m[3], v1[3], v2[3], c1, c2, *uv1, *uv2, *uv3;
|
float m[3], v1[3], v2[3], c1, c2, *uv1, /* *uv2, */ /* UNUSED */ *uv3;
|
||||||
int id1, id2, i;
|
int id1, id2, i;
|
||||||
|
|
||||||
id1= (id+efa->len-1)%efa->len;
|
id1= (id+efa->len-1)%efa->len;
|
||||||
@ -783,7 +783,7 @@ static int nearest_uv_between(BMEditMesh *em, BMFace *efa, int UNUSED(nverts), i
|
|||||||
if (i == id1)
|
if (i == id1)
|
||||||
uv1 = luv->uv;
|
uv1 = luv->uv;
|
||||||
else if (i == id)
|
else if (i == id)
|
||||||
uv2 = luv->uv;
|
; /* uv2 = luv->uv; */ /* UNUSED */
|
||||||
else if (i == id2)
|
else if (i == id2)
|
||||||
uv3 = luv->uv;
|
uv3 = luv->uv;
|
||||||
|
|
||||||
@ -2005,7 +2005,9 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
|
|||||||
else if(flush==-1) EDBM_deselect_flush(em);
|
else if(flush==-1) EDBM_deselect_flush(em);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)flush; /* flush is otherwise UNUSED */
|
||||||
|
(void)sync; /* sync is otherwise UNUSED */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DAG_id_tag_update(obedit->data, 0);
|
DAG_id_tag_update(obedit->data, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user