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 <campbell@blender.org>2022-09-25 10:04:52 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 11:26:27 +0300
commit891949cbb47143420f4324cb60efc05ef5d70b39 (patch)
treefe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/blenkernel/intern/text.c
parentc9e35c2ced92082c86f1ecb9ecd16c6230218c7c (diff)
Cleanup: use 'u' prefixed integer types for brevity & cast style
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
Diffstat (limited to 'source/blender/blenkernel/intern/text.c')
-rw-r--r--source/blender/blenkernel/intern/text.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 1444ba1e1c4..98c401aacb0 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -354,7 +354,7 @@ static void cleanup_textline(TextLine *tl)
* used for load and reload (unlike txt_insert_buf)
* assumes all fields are empty
*/
-static void text_from_buf(Text *text, const unsigned char *buffer, const int len)
+static void text_from_buf(Text *text, const uchar *buffer, const int len)
{
int i, llen, lines_count;
@@ -419,7 +419,7 @@ static void text_from_buf(Text *text, const unsigned char *buffer, const int len
bool BKE_text_reload(Text *text)
{
- unsigned char *buffer;
+ uchar *buffer;
size_t buffer_len;
char filepath_abs[FILE_MAX];
BLI_stat_t st;
@@ -459,7 +459,7 @@ Text *BKE_text_load_ex(Main *bmain,
const char *relbase,
const bool is_internal)
{
- unsigned char *buffer;
+ uchar *buffer;
size_t buffer_len;
Text *ta;
char filepath_abs[FILE_MAX];
@@ -1088,16 +1088,16 @@ void txt_move_eof(Text *text, const bool sel)
}
}
-void txt_move_toline(Text *text, unsigned int line, const bool sel)
+void txt_move_toline(Text *text, uint line, const bool sel)
{
txt_move_to(text, line, 0, sel);
}
-void txt_move_to(Text *text, unsigned int line, unsigned int ch, const bool sel)
+void txt_move_to(Text *text, uint line, uint ch, const bool sel)
{
TextLine **linep;
int *charp;
- unsigned int i;
+ uint i;
if (sel) {
txt_curs_sel(text, &linep, &charp);
@@ -1118,8 +1118,8 @@ void txt_move_to(Text *text, unsigned int line, unsigned int ch, const bool sel)
break;
}
}
- if (ch > (unsigned int)((*linep)->len)) {
- ch = (unsigned int)((*linep)->len);
+ if (ch > (uint)((*linep)->len)) {
+ ch = (uint)((*linep)->len);
}
*charp = ch;