-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utf8: change return type of some helpers from int
to size_t
#1690
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ static const char *annotate_opt_usage[] = { | |
}; | ||
|
||
static int longest_file; | ||
static int longest_author; | ||
static size_t longest_author; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May I suggest to do this as a pre-emptive commit, i.e. reorder it to come before the signature change, and to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Sorry, but I don't understand the rationale behind this. What difference will this make? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The difference is that it will provide a better structure for the benefit of any reviewer. |
||
static int max_orig_digits; | ||
static int max_digits; | ||
static int max_score_digits; | ||
|
@@ -529,7 +529,7 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int | |
name = ci.author_mail.buf; | ||
else | ||
name = ci.author.buf; | ||
pad = longest_author - utf8_strwidth(name); | ||
pad = cast_size_t_to_int(longest_author - utf8_strwidth(name)); | ||
printf(" (%s%*s %10s", | ||
name, pad, "", | ||
format_time(ci.author_time, | ||
|
@@ -631,7 +631,7 @@ static void find_alignment(struct blame_scoreboard *sb, int *option) | |
|
||
for (e = sb->ent; e; e = e->next) { | ||
struct blame_origin *suspect = e->suspect; | ||
int num; | ||
size_t num; | ||
|
||
if (compute_auto_abbrev) | ||
auto_abbrev = update_auto_abbrev(auto_abbrev, suspect); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the Git mailing list, Patrick Steinhardt wrote (reply to this):