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>2013-04-01 11:57:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-01 11:57:33 +0400
commitc7e2a31bf25b33d9b579860576a473dba8461eb2 (patch)
tree88e75ca84e97b9c61b490506f4ad747366583eb1
parent5e02acf8872996e90815606425862aeabe2012b8 (diff)
correct too-big allocation in mesh beautify.
-rw-r--r--GNUmakefile4
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py4
-rw-r--r--source/blender/bmesh/operators/bmo_beautify.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/GNUmakefile b/GNUmakefile
index c1b67c86ed2..c7db7ab947a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -272,7 +272,9 @@ project_eclipse:
check_cppcheck:
$(CMAKE_CONFIG)
cd $(BUILD_DIR) ; \
- python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py
+ python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py 2> \
+ $(BLENDER_DIR)/check_cppcheck.txt
+ @echo "written: check_cppcheck.txt"
check_clang_array:
$(CMAKE_CONFIG)
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py
index 2f7ffa5c240..25e39376dd2 100644
--- a/build_files/cmake/cmake_static_check_cppcheck.py
+++ b/build_files/cmake/cmake_static_check_cppcheck.py
@@ -41,9 +41,9 @@ CHECKER_ARGS = [
# not sure why this is needed, but it is.
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
"--suppress=*:%s/extern/glew/include/GL/glew.h:241" % project_source_info.SOURCE_DIR,
- # "--max-configs=1", # speeds up execution
+ "--max-configs=1", # speeds up execution
# "--check-config", # when includes are missing
- # "--enable=all", # if you want sixty hundred pedantic suggestions
+ "--enable=all", # if you want sixty hundred pedantic suggestions
]
if USE_QUIET:
diff --git a/source/blender/bmesh/operators/bmo_beautify.c b/source/blender/bmesh/operators/bmo_beautify.c
index 3e968f9250d..68d0c662b2c 100644
--- a/source/blender/bmesh/operators/bmo_beautify.c
+++ b/source/blender/bmesh/operators/bmo_beautify.c
@@ -33,8 +33,6 @@
*
* TODO
* - Take face normals into account.
- * - Use a stack of rotations to perform the best onces first
- * similar to edge-collapse-decimate.
*/
#include "BLI_math.h"
@@ -305,7 +303,7 @@ static void bm_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge
#endif
eheap = BLI_heap_new_ex(edge_array_len);
- eheap_table = MEM_mallocN(sizeof(HeapNode *) * bm->totedge, __func__);
+ eheap_table = MEM_mallocN(sizeof(HeapNode *) * edge_array_len, __func__);
/* build heap */
for (i = 0; i < edge_array_len; i++) {
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index d5ece4830af..1c0830a8158 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -185,7 +185,7 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
ups->brush_rotation = 0.0f;
}
- if ((brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM))
+ if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_RANDOM)
BKE_brush_randomize_texture_coordinates(ups);
else
copy_v2_v2(ups->tex_mouse, mouse);