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>2014-01-04 10:16:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-04 11:10:01 +0400
commitb9114cb609698bdd40175b79c017b8ec8d10b518 (patch)
tree98dc331711dcd06fb69f905ebdaf7937a4d23379 /source/blender/blenkernel/intern
parent091740f858c1b6d3016e38fc3186cce737d9ff2c (diff)
UI: Use bool rather then int/short's where possible
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/colortools.c2
-rw-r--r--source/blender/blenkernel/intern/text.c24
-rw-r--r--source/blender/blenkernel/intern/unit.c6
3 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 578fa5d348d..c2ce779f03f 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -681,7 +681,7 @@ static int sort_curvepoints(const void *a1, const void *a2)
/* ************************ more CurveMapping calls *************** */
/* note; only does current curvemap! */
-void curvemapping_changed(CurveMapping *cumap, int rem_doubles)
+void curvemapping_changed(CurveMapping *cumap, const bool rem_doubles)
{
CurveMap *cuma = cumap->cm + cumap->cur;
CurveMapPoint *cmp = cuma->curve;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 96601985f67..b2c10ca78ae 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -847,7 +847,7 @@ int txt_utf8_column_to_offset(const char *str, int column)
return offset;
}
-void txt_move_up(Text *text, short sel)
+void txt_move_up(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -870,7 +870,7 @@ void txt_move_up(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_down(Text *text, short sel)
+void txt_move_down(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -892,7 +892,7 @@ void txt_move_down(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_left(Text *text, short sel)
+void txt_move_left(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -937,7 +937,7 @@ void txt_move_left(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_right(Text *text, short sel)
+void txt_move_right(Text *text, const bool sel)
{
TextLine **linep;
int *charp, do_tab = FALSE, i;
@@ -979,7 +979,7 @@ void txt_move_right(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_jump_left(Text *text, bool sel, bool use_init_step)
+void txt_jump_left(Text *text, const bool sel, const bool use_init_step)
{
TextLine **linep;
int *charp;
@@ -996,7 +996,7 @@ void txt_jump_left(Text *text, bool sel, bool use_init_step)
if (!sel) txt_pop_sel(text);
}
-void txt_jump_right(Text *text, bool sel, bool use_init_step)
+void txt_jump_right(Text *text, const bool sel, const bool use_init_step)
{
TextLine **linep;
int *charp;
@@ -1013,7 +1013,7 @@ void txt_jump_right(Text *text, bool sel, bool use_init_step)
if (!sel) txt_pop_sel(text);
}
-void txt_move_bol(Text *text, short sel)
+void txt_move_bol(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -1028,7 +1028,7 @@ void txt_move_bol(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_eol(Text *text, short sel)
+void txt_move_eol(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -1043,7 +1043,7 @@ void txt_move_eol(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_bof(Text *text, short sel)
+void txt_move_bof(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -1059,7 +1059,7 @@ void txt_move_bof(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_eof(Text *text, short sel)
+void txt_move_eof(Text *text, const bool sel)
{
TextLine **linep;
int *charp;
@@ -1075,13 +1075,13 @@ void txt_move_eof(Text *text, short sel)
if (!sel) txt_pop_sel(text);
}
-void txt_move_toline(Text *text, unsigned int line, short sel)
+void txt_move_toline(Text *text, unsigned int line, const bool sel)
{
txt_move_to(text, line, 0, sel);
}
/* Moves to a certain byte in a line, not a certain utf8-character! */
-void txt_move_to(Text *text, unsigned int line, unsigned int ch, short sel)
+void txt_move_to(Text *text, unsigned int line, unsigned int ch, const bool sel)
{
TextLine **linep;
int *charp;
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 11a39752391..a26b579f5e5 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -29,12 +29,14 @@
#include <ctype.h>
#include <string.h>
#include <assert.h>
-#include "BKE_unit.h"
+#include "BLI_sys_types.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
+#include "BKE_unit.h" /* own include */
+
#ifdef WIN32
# include "BLI_winstuff.h"
#endif
@@ -421,7 +423,7 @@ static size_t unit_as_string(char *str, int len_max, double value, int prec, bUn
/* Used for drawing number buttons, try keep fast.
* Return the length of the generated string.
*/
-size_t bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, int pad)
+size_t bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, bool pad)
{
bUnitCollection *usys = unit_get_system(system, type);