Cleanup: style & const's

This commit is contained in:
Campbell Barton 2015-05-05 05:17:25 +10:00
parent 7478eb9bd0
commit e59bd19fa7
11 changed files with 13 additions and 25 deletions

View File

@ -24,8 +24,7 @@
CCL_NAMESPACE_BEGIN
enum BVH_STAT
{
enum BVH_STAT {
BVH_STAT_NODE_COUNT,
BVH_STAT_INNER_COUNT,
BVH_STAT_LEAF_COUNT,

View File

@ -73,9 +73,9 @@ static void recount_totsels(BMesh *bm)
/** \name BMesh helper functions for selection flushing.
* \{ */
static bool bm_vert_is_edge_select_any_other(BMVert *v, BMEdge *e_first)
static bool bm_vert_is_edge_select_any_other(const BMVert *v, const BMEdge *e_first)
{
BMEdge *e_iter = e_first;
const BMEdge *e_iter = e_first;
/* start by stepping over the current edge */
while ((e_iter = bmesh_disk_edge_next(e_iter, v)) != e_first) {
@ -87,10 +87,10 @@ static bool bm_vert_is_edge_select_any_other(BMVert *v, BMEdge *e_first)
}
#if 0
static bool bm_vert_is_edge_select_any(BMVert *v)
static bool bm_vert_is_edge_select_any(const BMVert *v)
{
if (v->e) {
BMEdge *e_iter, *e_first;
const BMEdge *e_iter, *e_first;
e_iter = e_first = v->e;
do {
if (BM_elem_flag_test(e_iter, BM_ELEM_SELECT)) {
@ -104,7 +104,7 @@ static bool bm_vert_is_edge_select_any(BMVert *v)
static bool bm_edge_is_face_select_any_other(BMLoop *l_first)
{
BMLoop *l_iter = l_first;
const BMLoop *l_iter = l_first;
/* start by stepping over the current face */
while ((l_iter = l_iter->radial_next) != l_first) {
@ -116,10 +116,10 @@ static bool bm_edge_is_face_select_any_other(BMLoop *l_first)
}
#if 0
static bool bm_edge_is_face_select_any(BMEdge *e)
static bool bm_edge_is_face_select_any(const BMEdge *e)
{
if (e->l) {
BMLoop *l_iter, *l_first;
const BMLoop *l_iter, *l_first;
l_iter = l_first = e->l;
do {
if (BM_elem_flag_test(l_iter->f, BM_ELEM_SELECT)) {

View File

@ -34,7 +34,6 @@
#include "BLI_utildefines.h"
#include "BLI_alloca.h"
#include "BLI_memarena.h"
#include "BLI_listbase.h"
#include "BLI_heap.h"
#include "BLI_edgehash.h"

View File

@ -40,7 +40,6 @@
#include "BLI_utildefines.h"
#include "DNA_gpencil_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BKE_context.h"

View File

@ -29,8 +29,6 @@
* \ingroup edobj
*/
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
@ -59,7 +57,6 @@
#include "ED_object.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "object_intern.h"

View File

@ -48,7 +48,6 @@
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BKE_context.h"

View File

@ -2069,7 +2069,7 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float fill_co
#define MAX_METADATA_STR 1024
const char *meta_data_list[] =
static const char *meta_data_list[] =
{
"File",
"Strip",

View File

@ -81,7 +81,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
ScrArea *sa = CTX_wm_area(C);
Scene *scene = sc->scene;
Base *base;
unsigned int lay = scene->lay;
#if 0 /* Using the context breaks adding objects in the UI. Need to find out why - campbell */
Object *obact = CTX_data_active_object(C);
@ -119,7 +118,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
int selectable_objects = CTX_data_equals(member, "selectable_objects");
for (base = scene->base.first; base; base = base->next) {
if (base->lay & lay) {
if (base->lay & scene->lay) {
if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0 && (base->object->restrictflag & OB_RESTRICT_SELECT) == 0) {
if (selectable_objects)
CTX_data_id_list_add(result, &base->object->id);

View File

@ -671,8 +671,7 @@ PaintStroke *paint_stroke_new(bContext *C,
get_imapaint_zoom(C, &zoomx, &zoomy);
stroke->zoom_2d = max_ff(zoomx, zoomy);
if (stroke->stroke_mode == BRUSH_STROKE_INVERT)
{
if (stroke->stroke_mode == BRUSH_STROKE_INVERT) {
if (br->flag & (BRUSH_CURVE)) {
RNA_enum_set(op->ptr, "mode", BRUSH_STROKE_NORMAL);
}
@ -1137,8 +1136,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
copy_v2_fl2(mouse, event->mval[0], event->mval[1]);
paint_stroke_line_constrain(stroke, mouse);
if (stroke->stroke_started && (first_modal || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE))))
{
if (stroke->stroke_started && (first_modal || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)))) {
if ((br->mtex.brush_angle_mode & MTEX_ANGLE_RAKE) || (br->mtex.brush_angle_mode & MTEX_ANGLE_RAKE)) {
copy_v2_v2(stroke->ups->last_rake, stroke->last_mouse_position);
}

View File

@ -29,7 +29,6 @@
#include <math.h>
#include <string.h>
#include "BLI_math_color.h"
#include "BLI_utildefines.h"
#include "IMB_colormanagement.h"

View File

@ -40,8 +40,7 @@ typedef struct PackedFile {
void *data;
} PackedFile;
enum PF_FileStatus
{
enum PF_FileStatus {
PF_EQUAL = 0,
PF_DIFFERS = 1,
PF_NOFILE = 2,