Skip to content

Commit 69907b8

Browse files
committed
Fix missing {}
Signed-off-by: JR <[email protected]>
1 parent e045013 commit 69907b8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Main.cc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -374,27 +374,20 @@ static int TraceTclCommand(
374374
ClientData clientData,
375375
Tcl_Interp* interp,
376376
int /* level */,
377-
const char* /* command */,
377+
const char* command ,
378378
Tcl_Command commandToken,
379379
int objc,
380380
Tcl_Obj *const objv[])
381381
{
382382

383383
auto* commands = static_cast<std::set<std::string>*>(clientData);
384-
std::string cmd_str;
385-
for (int i = 0; i < objc; i++) {
386-
cmd_str += Tcl_GetString(objv[i]);
387-
if (i < objc - 1) {
388-
cmd_str += " ";
389-
}
390-
}
391384
utl::Logger* logger = ord::OpenRoad::openRoad()->getLogger();
392385
if(commands->count(Tcl_GetString(objv[0]))){
393386
Tcl_Obj *fullName = Tcl_NewObj();
394387
Tcl_GetCommandFullName(interp, commandToken, fullName);
395388
string fullName_str = Tcl_GetString(fullName);
396389
if(fullName_str.compare(0, 7, "::sta::")==0||!sta_commands->count(Tcl_GetString(objv[0]))){
397-
logger->report("[CMD] "+cmd_str);
390+
logger->report("[CMD] {}", command);
398391
}
399392
}
400393
return TCL_OK;

0 commit comments

Comments
 (0)