Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9173980

Browse files
authored
Use size_t rather than int in SplitString. (tinyobjloader#290)
This prevents a warning when tiny_obj_loader is compiled with -Wsign-compare.
1 parent 53d7725 commit 9173980

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tiny_obj_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ static void SplitString(const std::string &s, char delim, char escape,
16661666
std::string token;
16671667

16681668
bool escaping = false;
1669-
for (int i = 0; i < s.size(); ++i) {
1669+
for (size_t i = 0; i < s.size(); ++i) {
16701670
char ch = s[i];
16711671
if (escaping) {
16721672
escaping = false;

0 commit comments

Comments
 (0)