[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55691] trunk/blender: correct too-big allocation in mesh beautify.
Campbell Barton
ideasman42 at gmail.com
Mon Apr 1 09:57:33 CEST 2013
Revision: 55691
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55691
Author: campbellbarton
Date: 2013-04-01 07:57:33 +0000 (Mon, 01 Apr 2013)
Log Message:
-----------
correct too-big allocation in mesh beautify.
Modified Paths:
--------------
trunk/blender/GNUmakefile
trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py
trunk/blender/source/blender/bmesh/operators/bmo_beautify.c
trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
Modified: trunk/blender/GNUmakefile
===================================================================
--- trunk/blender/GNUmakefile 2013-04-01 07:50:51 UTC (rev 55690)
+++ trunk/blender/GNUmakefile 2013-04-01 07:57:33 UTC (rev 55691)
@@ -272,7 +272,9 @@
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)
Modified: trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py
===================================================================
--- trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py 2013-04-01 07:50:51 UTC (rev 55690)
+++ trunk/blender/build_files/cmake/cmake_static_check_cppcheck.py 2013-04-01 07:57:33 UTC (rev 55691)
@@ -41,9 +41,9 @@
# 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:
Modified: trunk/blender/source/blender/bmesh/operators/bmo_beautify.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_beautify.c 2013-04-01 07:50:51 UTC (rev 55690)
+++ trunk/blender/source/blender/bmesh/operators/bmo_beautify.c 2013-04-01 07:57:33 UTC (rev 55691)
@@ -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 @@
#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++) {
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c 2013-04-01 07:50:51 UTC (rev 55690)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c 2013-04-01 07:57:33 UTC (rev 55691)
@@ -185,7 +185,7 @@
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);
More information about the Bf-blender-cvs
mailing list