Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-04-18 20:36:37 +0300
committerHans Goudey <h.goudey@me.com>2022-04-18 20:36:37 +0300
commit98fc998c70c172b70557e69eb3b832661d23bf1a (patch)
tree2b28b7c15d6747614761a985510fe7dbfb25a088 /source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
parentfc58368263ce5be7771cc06498ea360fadfc75cf (diff)
Cleanup: Clang tidy
- Inconsistent parameter names - Else after return - Braces around statements - Qualified auto - Also (not clang tidy): Pass StringRef by value, unused parameter
Diffstat (limited to 'source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc')
-rw-r--r--source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
index 184810b9802..3e722f8a0dd 100644
--- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
+++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc
@@ -360,8 +360,9 @@ void OBJParser::parse(Vector<std::unique_ptr<Geometry>> &r_all_geometries,
while (last_nl > 0) {
--last_nl;
if (buffer[last_nl] == '\n') {
- if (last_nl < 1 || buffer[last_nl - 1] != '\\')
+ if (last_nl < 1 || buffer[last_nl - 1] != '\\') {
break;
+ }
}
}
if (buffer[last_nl] != '\n') {
@@ -380,8 +381,9 @@ void OBJParser::parse(Vector<std::unique_ptr<Geometry>> &r_all_geometries,
while (!buffer_str.is_empty()) {
StringRef line = read_next_line(buffer_str);
++line_number;
- if (line.is_empty())
+ if (line.is_empty()) {
continue;
+ }
/* Most common things that start with 'v': vertices, normals, UVs. */
if (line[0] == 'v') {
if (line.startswith("v ")) {
@@ -643,8 +645,9 @@ void MTLParser::parse_and_store(Map<string, std::unique_ptr<MTLMaterial>> &r_mat
StringRef buffer_str{(const char *)buffer, (int64_t)buffer_len};
while (!buffer_str.is_empty()) {
StringRef line = read_next_line(buffer_str);
- if (line.is_empty())
+ if (line.is_empty()) {
continue;
+ }
if (line.startswith("newmtl ")) {
line = line.drop_prefix(7);