Changeset 4366 for trunk/packages


Ignore:
Timestamp:
May 28, 2014, 7:39:57 AM (10 years ago)
Author:
ldelgass
Message:

use string stream instead of Tcl string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/RenderServer.cpp

    r4111 r4366  
    220220VtkVis::getStatsFile(Tcl_Interp *interp, Tcl_Obj *objPtr)
    221221{
    222     Tcl_DString ds;
    223222    Tcl_Obj **objv;
    224223    int objc;
     
    247246        sprintf(fileName + i * 2, "%02x", digest[i]);
    248247    }
    249     Tcl_DStringInit(&ds);
    250     Tcl_DStringAppend(&ds, STATSDIR, -1);
    251     Tcl_DStringAppend(&ds, "/", 1);
    252     Tcl_DStringAppend(&ds, fileName, 32);
    253     path = Tcl_DStringValue(&ds);
     248    std::ostringstream oss;
     249    oss << STATSDIR << "/" << fileName;
     250    path = oss.str().c_str();
    254251
    255252    g_statsFile = open(path, O_EXCL | O_CREAT | O_WRONLY, 0600);
    256     Tcl_DStringFree(&ds);
    257253    if (g_statsFile < 0) {
    258254        ERROR("can't open \"%s\": %s", fileName, strerror(errno));
Note: See TracChangeset for help on using the changeset viewer.