Skip to content

Commit d9652cd

Browse files
committed
Use source.c_str() for NSString creation
Pass the underlying C string to +[NSString stringWithUTF8String:] instead of the std::string object. This fixes an incorrect/ambiguous conversion when creating the Metal shader source NSString in the renderer. Signed-off-by: Vlad (Kuzmin) Erium <libalias@gmail.com> Signed-off-by: Vlad <shaamaan@gmail.com>
1 parent b6b1aad commit d9652cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/imiv/imiv_renderer_metal.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ fragment float4 imivPreviewFragment(VertexOut in [[stage_in]],
10821082
return rgba;
10831083
}
10841084
)metal";
1085-
return [NSString stringWithUTF8String:source];
1085+
return [NSString stringWithUTF8String:source.c_str()];
10861086
}
10871087

10881088
bool create_preview_pipeline(RendererBackendState& state,

0 commit comments

Comments
 (0)