Skip to content

Commit

Permalink
Fix cast warning in Unicode function
Browse files Browse the repository at this point in the history
Fixes #339. Fixes a sign conversion warning in a function compiled by
-DCXXOPTS_USE_UNICODE_HELP=1.
  • Loading branch information
jarro2783 committed Mar 14, 2023
1 parent 89a9d33 commit 120205a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ options. The project adheres to semantic versioning.
### Bug Fixes

* Fixed version number in header.
* Fixed cast warning in Unicode function.

## 3.1

Expand Down
4 changes: 2 additions & 2 deletions include/cxxopts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ stringAppend(String& s, Iterator begin, Iterator end)
}

inline
std::size_t
size_t
stringLength(const String& s)
{
return s.length();
return static_cast<size_t>(s.length());
}

inline
Expand Down

0 comments on commit 120205a

Please sign in to comment.