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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-08 10:46:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-08 10:46:10 +0400
commit617a73c573c209155a2f5734030d1cc41e0d6a3d (patch)
tree8796d68b0c1926563abd5e8e1917339e02511ede /source/blender
parentb0e2218093a1daac03361b9454006bcdba67b725 (diff)
code cleanup: unused defines & some formatting.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c3
-rw-r--r--source/blender/bmesh/intern/bmesh_queries.c1
-rw-r--r--source/blender/bmesh/operators/bmo_smooth_laplacian.c4
-rw-r--r--source/blender/bmesh/operators/bmo_utils.c2
-rw-r--r--source/blender/editors/mesh/editmesh_select.c4
-rw-r--r--source/blender/imbuf/intern/dds/BlockDXT.h36
-rw-r--r--source/blender/imbuf/intern/dds/Stream.h2
-rw-r--r--source/blender/imbuf/intern/jp2.c2
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c1
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorSpill.c7
10 files changed, 30 insertions, 32 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 2e0b3a3c64a..a0a402cc061 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1956,12 +1956,11 @@ static DerivedMesh *cddm_from_bmesh_ex(struct BMesh *bm, int use_mdisps,
/* avoid this where possiblem, takes extra memory */
if (use_tessface) {
- int *polyindex;
BM_mesh_elem_index_ensure(bm, BM_FACE);
index = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
- for (i = 0; i < dm->numTessFaceData; i++, index++, polyindex++) {
+ for (i = 0; i < dm->numTessFaceData; i++, index++) {
MFace *mf = &mface[i];
const BMLoop **l = em_looptris[i];
efa = l[0]->f;
diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c
index 4b07dd74eef..ed36a86274c 100644
--- a/source/blender/bmesh/intern/bmesh_queries.c
+++ b/source/blender/bmesh/intern/bmesh_queries.c
@@ -401,6 +401,7 @@ BMLoop *BM_vert_step_fan_loop(BMLoop *l, BMEdge **e_step)
}
else {
BLI_assert(0);
+ return NULL;
}
if (BM_edge_is_manifold(e_next)) {
diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c
index 51b9adb5de3..362123e412d 100644
--- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c
+++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c
@@ -43,8 +43,8 @@
#include "intern/bmesh_operators_private.h" /* own include */
-#define SMOOTH_LAPLACIAN_AREA_FACTOR 4.0f
-#define SMOOTH_LAPLACIAN_EDGE_FACTOR 2.0f
+// #define SMOOTH_LAPLACIAN_AREA_FACTOR 4.0f /* UNUSED */
+// #define SMOOTH_LAPLACIAN_EDGE_FACTOR 2.0f /* UNUSED */
#define SMOOTH_LAPLACIAN_MAX_EDGE_PERCENTAGE 1.8f
#define SMOOTH_LAPLACIAN_MIN_EDGE_PERCENTAGE 0.15f
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c
index e311b383b86..aa514a5c0a7 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -282,7 +282,7 @@ void bmo_region_extend_exec(BMesh *bm, BMOperator *op)
#define FACE_VIS 1
#define FACE_FLAG 2
-#define FACE_MARK 4
+// #define FACE_MARK 4 /* UNUSED */
#define FACE_FLIP 8
/* NOTE: these are the original recalc_face_normals comment in editmesh_mods.c,
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index ca4f0688f86..92ad0742ec9 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1199,8 +1199,8 @@ static float step_cost_3_v3(const float v1[3], const float v2[3], const float v3
static float edgetag_cut_cost(BMEdge *e1, BMEdge *e2, BMVert *v)
{
- BMVert *v1 = (e1->v1 == v) ? e1->v2 : e1->v1;
- BMVert *v2 = (e2->v1 == v) ? e2->v2 : e2->v1;
+ BMVert *v1 = BM_edge_other_vert(e1, v);
+ BMVert *v2 = BM_edge_other_vert(e2, v);
return step_cost_3_v3(v1->co, v->co, v2->co);
}
diff --git a/source/blender/imbuf/intern/dds/BlockDXT.h b/source/blender/imbuf/intern/dds/BlockDXT.h
index 9b90b744b67..0291816cd03 100644
--- a/source/blender/imbuf/intern/dds/BlockDXT.h
+++ b/source/blender/imbuf/intern/dds/BlockDXT.h
@@ -173,24 +173,24 @@ struct AlphaBlockDXT5
};
*/
uint64 u;
- uint8 alpha0() const { return u & 0xffLL; };
- uint8 alpha1() const { return (u >> 8) & 0xffLL; };
- uint8 bits0() const { return (u >> 16) & 0x7LL; };
- uint8 bits1() const { return (u >> 19) & 0x7LL; };
- uint8 bits2() const { return (u >> 22) & 0x7LL; };
- uint8 bits3() const { return (u >> 25) & 0x7LL; };
- uint8 bits4() const { return (u >> 28) & 0x7LL; };
- uint8 bits5() const { return (u >> 31) & 0x7LL; };
- uint8 bits6() const { return (u >> 34) & 0x7LL; };
- uint8 bits7() const { return (u >> 37) & 0x7LL; };
- uint8 bits8() const { return (u >> 40) & 0x7LL; };
- uint8 bits9() const { return (u >> 43) & 0x7LL; };
- uint8 bitsA() const { return (u >> 46) & 0x7LL; };
- uint8 bitsB() const { return (u >> 49) & 0x7LL; };
- uint8 bitsC() const { return (u >> 52) & 0x7LL; };
- uint8 bitsD() const { return (u >> 55) & 0x7LL; };
- uint8 bitsE() const { return (u >> 58) & 0x7LL; };
- uint8 bitsF() const { return (u >> 61) & 0x7LL; };
+ uint8 alpha0() const { return u & 0xffLL; }
+ uint8 alpha1() const { return (u >> 8) & 0xffLL; }
+ uint8 bits0() const { return (u >> 16) & 0x7LL; }
+ uint8 bits1() const { return (u >> 19) & 0x7LL; }
+ uint8 bits2() const { return (u >> 22) & 0x7LL; }
+ uint8 bits3() const { return (u >> 25) & 0x7LL; }
+ uint8 bits4() const { return (u >> 28) & 0x7LL; }
+ uint8 bits5() const { return (u >> 31) & 0x7LL; }
+ uint8 bits6() const { return (u >> 34) & 0x7LL; }
+ uint8 bits7() const { return (u >> 37) & 0x7LL; }
+ uint8 bits8() const { return (u >> 40) & 0x7LL; }
+ uint8 bits9() const { return (u >> 43) & 0x7LL; }
+ uint8 bitsA() const { return (u >> 46) & 0x7LL; }
+ uint8 bitsB() const { return (u >> 49) & 0x7LL; }
+ uint8 bitsC() const { return (u >> 52) & 0x7LL; }
+ uint8 bitsD() const { return (u >> 55) & 0x7LL; }
+ uint8 bitsE() const { return (u >> 58) & 0x7LL; }
+ uint8 bitsF() const { return (u >> 61) & 0x7LL; }
void evaluatePalette(uint8 alpha[8]) const;
void evaluatePalette8(uint8 alpha[8]) const;
diff --git a/source/blender/imbuf/intern/dds/Stream.h b/source/blender/imbuf/intern/dds/Stream.h
index 7fed4ca89e7..a1ac49b58da 100644
--- a/source/blender/imbuf/intern/dds/Stream.h
+++ b/source/blender/imbuf/intern/dds/Stream.h
@@ -35,7 +35,7 @@ struct Stream
unsigned char *mem; // location in memory
unsigned int size; // size
unsigned int pos; // current position
- Stream(unsigned char *m, unsigned int s) : mem(m), size(s), pos(0) {};
+ Stream(unsigned char *m, unsigned int s) : mem(m), size(s), pos(0) {}
unsigned int seek(unsigned int p);
};
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 692ba3c49ea..d94f6368298 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -41,7 +41,7 @@
#include "openjpeg.h"
-#define JP2_FILEHEADER_SIZE 14
+// #define JP2_FILEHEADER_SIZE 14 /* UNUSED */
static char JP2_HEAD[] = {0x0, 0x0, 0x0, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A};
static char J2K_HEAD[] = {0xFF, 0x4F, 0xFF, 0x51, 0x00};
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 72cec0e3749..03ed1bb8008 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -65,7 +65,6 @@
#define BLU 2
#define EXP 3
#define COLXS 128
-#define STR_MAX 540
typedef unsigned char RGBE[4];
typedef float fCOLOR[3];
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
index e8965d50b47..44a5ac9e968 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
@@ -29,12 +29,8 @@
* \ingroup cmpnodes
*/
-
-
#include "node_composite_util.h"
-#define AVG(a, b) ((a + b) / 2)
-
/* ******************* Color Spill Supression ********************************* */
static bNodeSocketTemplate cmp_node_color_spill_in[] = {
{SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
@@ -49,6 +45,9 @@ static bNodeSocketTemplate cmp_node_color_spill_out[] = {
#ifdef WITH_COMPOSITOR_LEGACY
+#define AVG(a, b) ((a + b) / 2)
+
+
static void do_simple_spillmap_red(bNode *node, float* out, float *in)
{
NodeColorspill *ncs;