From a9121550b97b224c305e15511b74dcea9e654769 Mon Sep 17 00:00:00 2001 From: Pyarelal Knowles Date: Thu, 29 Dec 2022 14:12:29 -0800 Subject: [PATCH] SerializeGltfImage: add missing & std::string ref Hopefully the compiler would optimize this away but better to avoid the copy in the first place. --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index 9680b00..5be8fa3 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -7023,7 +7023,7 @@ static void SerializeGltfBufferView(const BufferView &bufferView, json &o) { } } -static void SerializeGltfImage(const Image &image, const std::string uri, +static void SerializeGltfImage(const Image &image, const std::string &uri, json &o) { // From 2.7.0, we look for `uri` parameter, not `Image.uri` // if uri is empty, the mimeType and bufferview should be set