diff options
author | Hector Dearman <hector.dearman@gmail.com> | 2020-12-22 08:03:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 17:03:24 +0900 |
commit | 9173980d1de273b17eba5e10eb189e8b4be89425 (patch) | |
tree | beecee2b5053e9439a5a0815b985adf08f264998 | |
parent | 53d772573b5b855b62aa0a5b3664f192c95270ca (diff) | |
download | tinyobjloader-9173980d1de273b17eba5e10eb189e8b4be89425.tar.gz |
Use size_t rather than int in SplitString. (#290)
This prevents a warning when tiny_obj_loader is compiled with
-Wsign-compare.
-rw-r--r-- | tiny_obj_loader.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tiny_obj_loader.h b/tiny_obj_loader.h index 14447b5..99213f6 100644 --- a/tiny_obj_loader.h +++ b/tiny_obj_loader.h @@ -1666,7 +1666,7 @@ static void SplitString(const std::string &s, char delim, char escape, std::string token; bool escaping = false; - for (int i = 0; i < s.size(); ++i) { + for (size_t i = 0; i < s.size(); ++i) { char ch = s[i]; if (escaping) { escaping = false; |