Skip to content

Commit 59a6e6a

Browse files
committed
int: minor simplification of some formatting
It's ok to directly pass ustring or ustringhash to fmt formatting, don't need to take c_str(). Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent d9dfaa2 commit 59a6e6a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/liboslexec/rendservices.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ RendererServices::filefmt(OSL::ShaderGlobals* sg,
252252
arg_values, message);
253253
// By default, do not write to file for security reasons. Instead prefix the
254254
// the message with the filename and hand it to the current error handler.
255-
auto file_message = OSL::fmtformat("{}:{}", filename_hash.c_str(), message);
255+
auto file_message = OSL::fmtformat("{}:{}", filename_hash, message);
256256
ShadingContext* ctx = (ShadingContext*)((ShaderGlobals*)sg)->context;
257257
ctx->messagefmt(file_message.c_str());
258258
}

src/liboslexec/wide/wide_opmessage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ __OSL_MASKED_OP(getmessage)(void* bsg_, void* result, ustring_pod source_,
332332
Mask(lane),
333333
"type mismatch for message \"{}\" ({} as {} here: {}:{})"
334334
" cannot fetch as {} from {}:{}",
335-
name.c_str(), has_data ? "created" : "queried",
335+
name, has_data ? "created" : "queried",
336336
m->type == TypeDesc::PTR ? "closure color"
337337
: m->type.c_str(),
338338
msg_sourcefile, msg_sourceline,

0 commit comments

Comments
 (0)