[Bf-blender-cvs] [5c48127877a] soc-2020-io-performance: Importer: Cleanup: const, remove unneeded assignment.
Ankit Meel
noreply at git.blender.org
Fri Dec 4 19:57:27 CET 2020
Commit: 5c48127877aa17f57e0a144741646a5f434900e1
Author: Ankit Meel
Date: Wed Dec 2 10:03:19 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rB5c48127877aa17f57e0a144741646a5f434900e1
Importer: Cleanup: const, remove unneeded assignment.
===================================================================
M source/blender/io/wavefront_obj/importer/parser_string_utils.cc
===================================================================
diff --git a/source/blender/io/wavefront_obj/importer/parser_string_utils.cc b/source/blender/io/wavefront_obj/importer/parser_string_utils.cc
index 361752238ff..3d48d6310b7 100644
--- a/source/blender/io/wavefront_obj/importer/parser_string_utils.cc
+++ b/source/blender/io/wavefront_obj/importer/parser_string_utils.cc
@@ -55,7 +55,7 @@ void read_next_line(std::ifstream &file, string &r_line)
* Also remove leading & trailing spaces as well as `\r` carriage return
* character if present.
*/
-void split_line_key_rest(StringRef line, StringRef &r_line_key, StringRef &r_rest_line)
+void split_line_key_rest(const StringRef line, StringRef &r_line_key, StringRef &r_rest_line)
{
if (line.is_empty()) {
return;
@@ -71,7 +71,8 @@ void split_line_key_rest(StringRef line, StringRef &r_line_key, StringRef &r_res
r_line_key = line.substr(0, pos_split);
}
- r_rest_line = line = line.drop_prefix(r_line_key.size());
+ /* Eat the delimiter also using "+ 1". */
+ r_rest_line = line.drop_prefix(r_line_key.size() + 1);
if (r_rest_line.is_empty()) {
return;
}
More information about the Bf-blender-cvs
mailing list