Changeset 6417 for code/trunk/src/libraries/core/TclBind.cc
- Timestamp:
- Dec 25, 2009, 10:23:58 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/TclBind.cc
r5929 r6417 101 101 { 102 102 Tcl::interpreter* interpreter = new Tcl::interpreter(); 103 std::stringlibpath = TclBind::getTclLibraryPath();103 const std::string& libpath = TclBind::getTclLibraryPath(); 104 104 105 105 try 106 106 { 107 if ( libpath != "")108 interpreter->eval("set tcl_library \"" + libpath + "\"");107 if (!libpath.empty()) 108 interpreter->eval("set tcl_library \"" + libpath + '"'); 109 109 110 110 Tcl_Init(interpreter->get()); … … 136 136 COUT(4) << "Tcl_query: " << args.get() << std::endl; 137 137 138 std::stringcommand = stripEnclosingBraces(args.get());138 const std::string& command = stripEnclosingBraces(args.get()); 139 139 140 140 if (!CommandExecutor::execute(command, false)) … … 152 152 { 153 153 COUT(4) << "Tcl_execute: " << args.get() << std::endl; 154 std::stringcommand = stripEnclosingBraces(args.get());154 const std::string& command = stripEnclosingBraces(args.get()); 155 155 156 156 if (!CommandExecutor::execute(command, false)) … … 166 166 try 167 167 { 168 std::stringoutput = TclBind::getInstance().interpreter_->eval("uplevel #0 " + tclcode);169 if ( output != "")168 const std::string& output = TclBind::getInstance().interpreter_->eval("uplevel #0 " + tclcode); 169 if (!output.empty()) 170 170 { 171 171 COUT(0) << "tcl> " << output << std::endl; … … 182 182 } 183 183 184 void TclBind::bgerror( std::stringerror)184 void TclBind::bgerror(const std::string& error) 185 185 { 186 186 COUT(1) << "Tcl background error: " << stripEnclosingBraces(error) << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.