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>2011-08-28 09:06:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-28 09:06:30 +0400
commitfa2ba5fbf5848e4d61b697c624af9b9e9456eb20 (patch)
tree8c7f0bcfc6af77f1bb491d4e4d230493f9d897c0 /source/blender/editors
parentc73d5b939dd9dcc68ed1d1316115c2c7cded9cab (diff)
- use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/render/render_preview.c1
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c8
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
7 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 3575a8527fc..ef88bb0bbb6 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1361,7 +1361,7 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt)
{
MenuType *mt= (MenuType*)arg_mt;
- Menu menu = {0};
+ Menu menu = {NULL};
menu.type= mt;
menu.layout= layout;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index b8cdc18e739..4b0c1cb1222 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3988,7 +3988,7 @@ static void PTCacheUndo_clear(PTCacheEdit *edit)
{
PTCacheUndo *undo;
- if(edit==0) return;
+ if(edit==NULL) return;
undo= edit->undo.first;
while(undo) {
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 007ae96ae59..b937f9a4104 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -64,6 +64,7 @@
#include "DNA_brush_types.h"
#include "DNA_screen_types.h"
+#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 0ac30853eae..ede17790318 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1702,7 +1702,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
+static int region_scale_cancel(bContext *UNUSED(C), wmOperator *op)
{
MEM_freeN(op->customdata);
op->customdata = NULL;
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 3560bfb9896..74e9e775087 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -231,7 +231,7 @@ void outliner_free_tree(ListBase *lb)
}
/* Find ith item from the treestore */
-TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
+static TreeElement *outliner_find_tree_element(ListBase *lb, int store_index)
{
TreeElement *te= lb->first, *tes;
while(te) {
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index dc84289a8de..9a904b1a970 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -700,7 +700,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
}
}
-static Sequence *special_seq_update= 0;
+static Sequence *special_seq_update= NULL;
static void UNUSED_FUNCTION(set_special_seq_update)(int val)
{
@@ -710,14 +710,14 @@ static void UNUSED_FUNCTION(set_special_seq_update)(int val)
if(val) {
// XXX special_seq_update= find_nearest_seq(&x);
}
- else special_seq_update= 0;
+ else special_seq_update= NULL;
}
void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs)
{
struct Main *bmain= CTX_data_main(C);
- struct ImBuf *ibuf = 0;
- struct ImBuf *scope = 0;
+ struct ImBuf *ibuf= NULL;
+ struct ImBuf *scope= NULL;
struct View2D *v2d = &ar->v2d;
int rectx, recty;
float viewrectx, viewrecty;
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 0ac23765167..86b28f5e89e 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -846,7 +846,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
for(seq= ed->seqbasep->first; seq; seq= seq->next) {
seq_rectf(seq, &rq);
- if(BLI_isect_rctf(&rq, &rectf, 0)) {
+ if(BLI_isect_rctf(&rq, &rectf, NULL)) {
if(selecting) seq->flag |= SELECT;
else seq->flag &= ~SEQ_ALLSEL;
recurs_sel_seq(seq);