[Bf-blender-cvs] [befe950f186] soc-2020-io-performance: Avoid .data() while creating a std::string from StringRef.
Ankit Meel
noreply at git.blender.org
Thu Aug 6 12:58:50 CEST 2020
Commit: befe950f186321ee48f223887fe665d37b84a6df
Author: Ankit Meel
Date: Thu Aug 6 16:28:45 2020 +0530
Branches: soc-2020-io-performance
https://developer.blender.org/rBbefe950f186321ee48f223887fe665d37b84a6df
Avoid .data() while creating a std::string from StringRef.
===================================================================
M source/blender/io/wavefront_obj/intern/wavefront_obj_im_mtl.cc
===================================================================
diff --git a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mtl.cc b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mtl.cc
index 0f43d3b0403..e28bbd2150e 100644
--- a/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mtl.cc
+++ b/source/blender/io/wavefront_obj/intern/wavefront_obj_im_mtl.cc
@@ -75,7 +75,7 @@ static void set_property_of_socket(eNodeSocketDatatype property_type,
static std::string replace_all_occurences(StringRef path, StringRef to_remove, StringRef to_add)
{
- std::string clean_path{path.data()};
+ std::string clean_path{path};
while (true) {
std::string::size_type pos = clean_path.find(to_remove);
if (pos == std::string::npos) {
More information about the Bf-blender-cvs
mailing list