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-03-17 23:13:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-17 23:13:04 +0400
commit09c41019a8ecb259b2376b5c22c99f54b59f8f24 (patch)
tree64802a773768eaae39b8ec315b582123f16707fa /source/blender/editors
parent16b82845eee4198b2d56aa5a5c373008f5070f7f (diff)
use const pointers for file loading and booleans for animation system return values passed as pointers.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c2
-rw-r--r--source/blender/editors/animation/keyframing.c6
-rw-r--r--source/blender/editors/armature/pose_slide.c2
-rw-r--r--source/blender/editors/interface/interface_anim.c12
-rw-r--r--source/blender/editors/render/render_preview.c2
-rw-r--r--source/blender/editors/sound/sound_ops.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index dc0fba0930f..dcdab8dba37 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -343,7 +343,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar
/* check that no data exists for the current frame... */
if (env->data) {
- short exists = -1;
+ bool exists;
int i = BKE_fcm_envelope_find_index(env->data, (float)(scene->r.cfra), env->totvert, &exists);
/* binarysearch_...() will set exists by default to 0, so if it is non-zero, that means that the point exists already */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index ed8398b7c8b..bc20311f773 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -237,7 +237,7 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag)
/* are there already keyframes? */
if (fcu->bezt) {
- short replace = -1;
+ bool replace;
i = binarysearch_bezt_index(fcu->bezt, bezt->vec[1][0], fcu->totvert, &replace);
/* replace an existing keyframe? */
@@ -1055,7 +1055,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
/* will only loop once unless the array index was -1 */
for (; array_index < array_index_max; array_index++) {
FCurve *fcu = verify_fcurve(act, group, &ptr, rna_path, array_index, 0);
- short found = -1;
+ bool found;
int i;
/* check if F-Curve exists and/or whether it can be edited */
@@ -1845,7 +1845,7 @@ short fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter)
/* we either include all regardless of muting, or only non-muted */
if ((filter & ANIMFILTER_KEYS_MUTED) || (fcu->flag & FCURVE_MUTED) == 0) {
- short replace = -1;
+ bool replace;
int i = binarysearch_bezt_index(fcu->bezt, frame, fcu->totvert, &replace);
/* binarysearch_bezt_index will set replace to be 0 or 1
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index 4d6f8f520f5..d19d8084608 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -1081,7 +1081,7 @@ static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu,
BezTriple *bezt;
float refVal = 0.0f;
- short keyExists;
+ bool keyExists;
int i, match;
short first = 1;
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index e4c163e9162..3feb563d3ee 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -55,19 +55,19 @@
#include "interface_intern.h"
-static FCurve *ui_but_get_fcurve(uiBut *but, bAction **action, int *driven)
+static FCurve *ui_but_get_fcurve(uiBut *but, bAction **action, bool *r_driven)
{
/* for entire array buttons we check the first component, it's not perfect
* but works well enough in typical cases */
int rnaindex = (but->rnaindex == -1) ? 0 : but->rnaindex;
- return rna_get_fcurve(&but->rnapoin, but->rnaprop, rnaindex, action, driven);
+ return rna_get_fcurve(&but->rnapoin, but->rnaprop, rnaindex, action, r_driven);
}
void ui_but_anim_flag(uiBut *but, float cfra)
{
FCurve *fcu;
- int driven;
+ bool driven;
but->flag &= ~(UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN);
@@ -90,7 +90,7 @@ int ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen)
{
FCurve *fcu;
ChannelDriver *driver;
- int driven;
+ bool driven;
fcu = ui_but_get_fcurve(but, NULL, &driven);
@@ -110,7 +110,7 @@ int ui_but_anim_expression_set(uiBut *but, const char *str)
{
FCurve *fcu;
ChannelDriver *driver;
- int driven;
+ bool driven;
fcu = ui_but_get_fcurve(but, NULL, &driven);
@@ -194,7 +194,7 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra)
ID *id;
bAction *action;
FCurve *fcu;
- int driven;
+ bool driven;
fcu = ui_but_get_fcurve(but, &action, &driven);
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 7802e5460ff..dd5b97a68ed 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -192,7 +192,7 @@ static Main *G_pr_main = NULL;
static Main *G_pr_main_cycles = NULL;
#ifndef WITH_HEADLESS
-static Main *load_main_from_memory(char *blend, int blend_size)
+static Main *load_main_from_memory(const void *blend, int blend_size)
{
const int fileflags = G.fileflags;
Main *bmain = NULL;
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index d25fd00514c..3aee9a5e31e 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -221,7 +221,7 @@ static int sound_update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op)
Sequence *seq;
Scene *scene = CTX_data_scene(C);
struct FCurve *fcu;
- char driven;
+ bool driven;
SEQ_BEGIN(scene->ed, seq)
{