diff options
author | Syoyo Fujita <syoyo@lighttransport.com> | 2017-06-05 02:00:32 +0900 |
---|---|---|
committer | Syoyo Fujita <syoyo@lighttransport.com> | 2017-06-05 02:00:32 +0900 |
commit | 99518b6d3e7c624d97e5e4791efcc96755c65d44 (patch) | |
tree | 767b0b8850534fc757325ff20e9841ad8e651b97 | |
parent | d8f702c6f78849c6e9ad0bc34072412a72855fbe (diff) | |
download | tinyobjloader-99518b6d3e7c624d97e5e4791efcc96755c65d44.tar.gz |
Suppress some clang warnings.
-rw-r--r-- | tiny_obj_loader.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tiny_obj_loader.h b/tiny_obj_loader.h index 4420831..3273e9d 100644 --- a/tiny_obj_loader.h +++ b/tiny_obj_loader.h @@ -177,7 +177,6 @@ typedef struct { real_t anisotropy; // aniso. [0, 1] default 0 real_t anisotropy_rotation; // anisor. [0, 1] default 0 real_t pad0; - real_t pad1; std::string roughness_texname; // map_Pr std::string metallic_texname; // map_Pm std::string sheen_texname; // map_Ps @@ -418,6 +417,8 @@ static std::istream &safeGetline(std::istream &is, std::string &t) { } } } + + return is; } #define IS_SPACE(x) (((x) == ' ') || ((x) == '\t')) @@ -1030,9 +1031,11 @@ void LoadMtl(std::map<std::string, int> *material_map, // set new mtl name token += 7; - std::stringstream ss; - ss << token; - material.name = ss.str(); + { + std::stringstream sstr; + sstr << token; + material.name = sstr.str(); + } continue; } @@ -1688,9 +1691,9 @@ bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes, tag.stringValues.resize(static_cast<size_t>(ts.num_strings)); for (size_t i = 0; i < static_cast<size_t>(ts.num_strings); ++i) { - std::stringstream ss; - ss << token; - tag.stringValues[i] = ss.str(); + std::stringstream sstr; + sstr << token; + tag.stringValues[i] = sstr.str(); token += tag.stringValues[i].size() + 1; } |