diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-04-29 14:46:44 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-05-03 10:04:49 -0400 |
commit | cb7fb8c008e3da673014952b960bf4604af7b210 (patch) | |
tree | f0e95663bb19be82fdaece06194e33cdc0c2d646 /src/memline.c | |
parent | 37935130f9c967f58de9900f7d86042116db9fd5 (diff) | |
download | rneovim-cb7fb8c008e3da673014952b960bf4604af7b210.tar.gz rneovim-cb7fb8c008e3da673014952b960bf4604af7b210.tar.bz2 rneovim-cb7fb8c008e3da673014952b960bf4604af7b210.zip |
Remove project int types: Case short_u: Replace with uint16_t.
- Replace short_u with uint16_t (same size, should give no problems).
- When possible, remove explicit downcasts so that they are found when
flag -Wconversion enabled.
- Remove short_u typedef.
Requested in #459.
Diffstat (limited to 'src/memline.c')
-rw-r--r-- | src/memline.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/memline.c b/src/memline.c index 31f1b525ca..90f286367a 100644 --- a/src/memline.c +++ b/src/memline.c @@ -100,9 +100,9 @@ struct pointer_entry { * A pointer block contains a list of branches in the tree. */ struct pointer_block { - short_u pb_id; /* ID for pointer block: PTR_ID */ - short_u pb_count; /* number of pointers in this block */ - short_u pb_count_max; /* maximum value for pb_count */ + uint16_t pb_id; /* ID for pointer block: PTR_ID */ + uint16_t pb_count; /* number of pointers in this block */ + uint16_t pb_count_max; /* maximum value for pb_count */ PTR_EN pb_pointer[1]; /* list of pointers to blocks (actually longer) * followed by empty space until end of page */ }; @@ -115,7 +115,7 @@ struct pointer_block { * etc. Thus the order of the lines is the opposite of the line number. */ struct data_block { - short_u db_id; /* ID for data block: DATA_ID */ + uint16_t db_id; /* ID for data block: DATA_ID */ unsigned db_free; /* free space available */ unsigned db_txt_start; /* byte where text starts */ unsigned db_txt_end; /* byte just after data block */ @@ -3011,8 +3011,7 @@ static bhdr_T *ml_new_ptr(memfile_T *mfp) pp = (PTR_BL *)(hp->bh_data); pp->pb_id = PTR_ID; pp->pb_count = 0; - pp->pb_count_max = (short_u)((mfp->mf_page_size - sizeof(PTR_BL)) - / sizeof(PTR_EN) + 1); + pp->pb_count_max = (mfp->mf_page_size - sizeof(PTR_BL)) / sizeof(PTR_EN) + 1; return hp; } |