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:
authorJeroen Bakker <jeroen@blender.org>2021-02-24 17:25:42 +0300
committerJeroen Bakker <jeroen@blender.org>2021-02-24 17:29:23 +0300
commitbb3e54d8beaf5c02056c1cc314c1c58256bcaa21 (patch)
treee728a7662eab7df7ee63b3031ef6da8cc2503999
parent79f34447d649a0fc680e3ebf95fa730981831668 (diff)
Cleanup: Cryptomatte Use StringRef(Null).
-rw-r--r--source/blender/blenkernel/intern/cryptomatte.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/cryptomatte.cc b/source/blender/blenkernel/intern/cryptomatte.cc
index d2a3f6eebbe..e5f4eed35d3 100644
--- a/source/blender/blenkernel/intern/cryptomatte.cc
+++ b/source/blender/blenkernel/intern/cryptomatte.cc
@@ -66,7 +66,7 @@ struct CryptomatteLayer {
hashes.add_overwrite(name, encode_hash(cryptomatte_hash));
}
- void add_encoded_hash(blender::StringRef name, std::string &cryptomatte_encoded_hash)
+ void add_encoded_hash(blender::StringRef name, blender::StringRefNull cryptomatte_encoded_hash)
{
hashes.add_overwrite(name, cryptomatte_encoded_hash);
}
@@ -269,7 +269,7 @@ void BKE_cryptomatte_matte_id_to_entries(const Main *bmain,
}
static std::string cryptomatte_determine_name(const ViewLayer *view_layer,
- const std::string cryptomatte_layer_name)
+ const blender::StringRefNull cryptomatte_layer_name)
{
std::stringstream stream;
const size_t view_layer_name_len = BLI_strnlen(view_layer->name, sizeof(view_layer->name));
@@ -277,9 +277,9 @@ static std::string cryptomatte_determine_name(const ViewLayer *view_layer,
return stream.str();
}
-static uint32_t cryptomatte_determine_identifier(const std::string name)
+static uint32_t cryptomatte_determine_identifier(const blender::StringRef name)
{
- return BLI_hash_mm3(reinterpret_cast<const unsigned char *>(name.c_str()), name.length(), 0);
+ return BLI_hash_mm3(reinterpret_cast<const unsigned char *>(name.data()), name.size(), 0);
}
static void add_render_result_meta_data(RenderResult *render_result,