util/StringStrip: use std::size_t
This commit is contained in:
parent
c63bd323ce
commit
9355ec44e0
|
@ -59,8 +59,8 @@ StripRight(const char *p, const char *end) noexcept
|
||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
std::size_t
|
||||||
StripRight(const char *p, size_t length) noexcept
|
StripRight(const char *p, std::size_t length) noexcept
|
||||||
{
|
{
|
||||||
while (length > 0 && IsWhitespaceOrNull(p[length - 1]))
|
while (length > 0 && IsWhitespaceOrNull(p[length - 1]))
|
||||||
--length;
|
--length;
|
||||||
|
@ -71,8 +71,8 @@ StripRight(const char *p, size_t length) noexcept
|
||||||
void
|
void
|
||||||
StripRight(char *p) noexcept
|
StripRight(char *p) noexcept
|
||||||
{
|
{
|
||||||
size_t old_length = strlen(p);
|
std::size_t old_length = strlen(p);
|
||||||
size_t new_length = StripRight(p, old_length);
|
std::size_t new_length = StripRight(p, old_length);
|
||||||
p[new_length] = 0;
|
p[new_length] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,8 @@ StripRight(char *p, char *end) noexcept
|
||||||
* side.
|
* side.
|
||||||
*/
|
*/
|
||||||
gcc_pure gcc_nonnull_all
|
gcc_pure gcc_nonnull_all
|
||||||
size_t
|
std::size_t
|
||||||
StripRight(const char *p, size_t length) noexcept;
|
StripRight(const char *p, std::size_t length) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strip trailing whitespace by null-terminating the string.
|
* Strip trailing whitespace by null-terminating the string.
|
||||||
|
|
Loading…
Reference in New Issue