Skip to content

Commit

Permalink
str_count signature should return size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiemars committed Nov 9, 2021
1 parent 435a2e6 commit 958c482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ctl/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ str_find(str* self, const char* s)
return SIZE_MAX;
}

static inline int
static inline size_t
str_count(str* self, char c)
{
size_t count = 0;
Expand Down

1 comment on commit 958c482

@junjiemars
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It's semantic right things.
  2. Avoid msvc C4267 warning.

Please sign in to comment.