mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-24 08:56:43 +02:00
Code Cleanup
- 'uft8_length' and 'utf8_text_length' now return unsigned ints.
This commit is contained in:
parent
4ca5c85054
commit
3583e2ff58
4 changed files with 19 additions and 15 deletions
|
@ -174,7 +174,7 @@ int utf8_sequence (unsigned int character)
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Length of a string in characters.
|
||||
int utf8_length (const std::string& str)
|
||||
unsigned int utf8_length (const std::string& str)
|
||||
{
|
||||
int byteLength = str.length ();
|
||||
int charLength = byteLength;
|
||||
|
@ -193,7 +193,7 @@ int utf8_length (const std::string& str)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int utf8_text_length (const std::string& str)
|
||||
unsigned int utf8_text_length (const std::string& str)
|
||||
{
|
||||
int byteLength = str.length ();
|
||||
int charLength = byteLength;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue